syntax error in vars bubstution [ shell module ]

Hi,

Try quoting the templated part. The {{ }} syntax markers mess up the
yaml parsing - http://docs.ansible.com/YAMLSyntax.html#gotchas

Hi Michael,

Quoting also did not work. I added “sh” before the {{ and it worked.

tasks:

  • name: stop tomcat
    shell: sh {{ tomcat_home }}/bin/shutdown.sh
  • name: start tomcat
    shell: sh {{ tomcat_home }}/bin/startup.sh

Thanks for the link.

Regards,
Olga

“Quoting also did not work. I added “sh” before the {{ and it worked.”

Please show me what you tried and what the output was?

Thanks!

Hi Michael,

You need to quote the whole line, not just the templated part: