I have a file which is datadog.conf in which i have to append the 
line dogstreams: 
/root/ddmonitor/pattern.txt:/opt/datadog-agent/agent/checks/libs/parsers.py:parse-web
 
at EOF

i am using ansible lineinfile option and my code looks like below:

```- name: copy datadog agent configuration file
  lineinfile: dest=/etc/dd-agent/datadog.conf regexp="^dogstreams: " 
line="dogstreams: 
/root/ddmonitor/pattern.txt:/opt/datadog-agent/agent/checks/libs/parsers.py:parse-web"```

i am getting below error while running playbook :

ERROR! Syntax Error while loading YAML.


The error appears to have been in 
'/etc/ansible/roles/datadog-pegalogs-apptier/tasks/main.yml': line 19, 
column 66, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: copy datadog agent configuration file
  lineinfile: dest=/etc/dd-agent/datadog.conf regexp="^dogstreams: " 
line="dogstreams: 
/root/ddmonitor/pattern.txt:/opt/datadog-agent/agent/checks/libs/parsers.py:parse_web"
                                                                 ^ here
We could be wrong, but this one looks like it might be an issue with
unbalanced quotes.  If starting a value with a quote, make sure the
line ends with the same set of quotes.  For instance this arbitrary
example:

    foo: "bad" "wolf"

Could be written as:

    foo: '"bad" "wolf"'

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0d6e41c2-5d0a-4251-99d2-b2aa870550a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to