On 13.02.2019 01:16, cortado wrote:
template file:{% if myvar == "value1" %} name: "mysql_RO_3306-a" {% elif myvar = "value2" %} name: "mysql_RO_3306-b" {% else %} name: "mysql_RO_3306-c" {% endif %}
<snip />
TASK [create RO var file] ***************************************************************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleError:template error while templating string: expected token 'end of statementblock', got '='. String: {% if myvar == \"value1\" %}\nname: \"mysql_RO_3306-a\"\n{% elif myvar = \"value2\" %}\nname:\"mysql_RO_3306-b\"\n{% else %}\nname: \"mysql_RO_3306-c\"\n{% endif %}\n"}
As your error message say "got '='", and if you check your code you see that you have a = instead of a ==.
-- Kai Stian Olstad -- 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/9d5c51f7e103159d7ed07f6b98acbd5d%40olstad.com. For more options, visit https://groups.google.com/d/optout.
