Not sure why I can’t reply to this thread: https://groups.google.com/forum/#!topic/ansible-project/EDXIk3WM7vk
But here is the question:
As suggested by Micheal, I can use the following if I want to use mutliline
Not sure why I can’t reply to this thread: https://groups.google.com/forum/#!topic/ansible-project/EDXIk3WM7vk
But here is the question:
As suggested by Micheal, I can use the following if I want to use mutliline
“It fails” is not the best way to report a problem. You should show /how/ you percieved the failure so we can understand what you are talking about.
You are indenting the “copy” line weird for sure, and i have no idea if you have “dest” defined appropriately.
I have had not so good luck with using {{ var }} in playbooks. I still use ${var}, which works fine.
e.g.
This works
Hi Kavin
that would be - hosts: “{{ hosts }}”
so if the variable is the first value of a yaml key it should be quoted, with an exception of “when”
This is because when starting a line with { YAML needs the line quoted since it thinks you want a hash
{{ foo }}
works fine, you just have to know that.
You should also be able tell because the error you get is about YAML syntax, it’s not saying something about Ansible
Thank you very much!!!
I should visit the documentation site more often. Found this in Gotchas
Hi
It failed I mean the {{ xxx }} didn’t get replaced during template execution when I am using multi-line method, it just leave as the original string as it.
The copy & dest alignment is just as an example, if I use a non {{ xxx }}, it works and get replaced.