YAML Syntax Error

25 views
Skip to first unread message

Altug Tekin

unread,
Mar 14, 2016, 10:32:47 AM3/14/16
to Ansible Project
Before I start banging my keyboard into the window, I wanted to ask why this task produces a Syntax Error:

    - name "cat /etc/shinken/modules/webui.cfg | grep 'modules auth-cfg-password'"
      shell: runuser -l shinken -c "cat /etc/shinken/modules/webui.cfg | grep 'modules auth-cfg-password' || true"
      ignore_errors: true
      register: is_authmodule_in_webui_config

I dont understand the error because:
  • I use double-quotes which surround the single quotes
  • the command does what it should do when run in the shell
The error is:

ERROR: Syntax Error while loading YAML script, config-shinken.yml
Note: The error may actually appear before this position: line 63, column 7
      shell: "cat /etc/shinken/modules/webui.cfg | grep 'modules auth-cfg-password' || true"



Help me please.

Josh Smift

unread,
Mar 14, 2016, 10:36:14 AM3/14/16
to ansible...@googlegroups.com
AT> Before I start banging my keyboard into the window, I wanted to ask
AT> why this task produces a Syntax Error:
AT>
AT> - name "cat /etc/shinken/modules/webui.cfg | grep 'modules
AT> auth-cfg-password'"
AT> shell: runuser -l shinken -c "cat /etc/shinken/modules/webui.cfg |

I think you're missing a colon after "name" in the first line.

-Josh (j...@care.com)

(apologies for the automatic corporate disclaimer that follows)




This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.

Altug Tekin

unread,
Mar 14, 2016, 12:32:36 PM3/14/16
to Ansible Project, j...@care.com
Yes that was it. Thank you. I found it 10 Minutes after writing the Mail.
Reply all
Reply to author
Forward
0 new messages