# Colon embedded in a quoted string

**URL:** <https://forum.ansible.com/t/colon-embedded-in-a-quoted-string/11621>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [June 19, 2012, 2:40pm UTC](https://forum.ansible.com/t/colon-embedded-in-a-quoted-string/11621 "2012-06-19T14:40:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fred\_Alger](https://avatars.discourse-cdn.com/v4/letter/f/c89c15/32.png) [@Fred\_Alger](https://forum.ansible.com/u/Fred_Alger)\
**Post date:** [June 19, 2012, 2:40pm UTC](https://forum.ansible.com/t/colon-embedded-in-a-quoted-string/11621/1 "2012-06-19T14:40:32Z")

</div>

I’ve not tried the lineinfile module, however, you may need to quote the WHOLE value you pass in, i.e.:

action: ‘lineinfile destfile=/etc/sudoers regexp=“^nagios” value=“nagios ALL=NOPASSWD: ALL” state=“present” insertafter=“EOF”’

That error indicates that the YAML parser’s trying to read part of that line as a mapping and then barfing because it’s in the middle of what looks like a string value.
