I've ended up with 2 simple rules on {{}}
1. moustaches don't stack!! {{ var1[{{var2}}] }} <= wrong, just
{{var1[var2]}}
2. always use moustaches except when when:. All conditionals already have
implied {{ }} so you would be violating rule #1, which CAN work but
sometimes gives you unexpected resu
On 12. mai 2016 08:06, Mark Maas wrote:
On Wednesday, May 11, 2016 at 4:31:12 PM UTC+2, Kai Stian Olstad wrote:
According to Brian Coca in this post {{ and }} is implied in when and
should not be used.
https://groups.google.com/forum/#!msg/ansible-project/1DyCROTgMF0/6siUigwuAQAJ
Now I'm los
On Wednesday, May 11, 2016 at 4:31:12 PM UTC+2, Kai Stian Olstad wrote:
>
> > ```
> > - name: Disable requiretty
> > lineinfile:
> > dest: /etc/sudoers
> > regexp: "Defaultsrequiretty"
> > line: "# Defaultsrequiretty"
> > when: ansible_os_family == "RedHat" and
> >
On 11. mai 2016 11:55, Mark Maas wrote:
I've always been following along with the examples here:
http://docs.ansible.com/ansible/playbooks_conditionals.html#the-when-statement
for instance:
```
- name: Disable requiretty
lineinfile:
dest: /etc/sudoers
regexp: "Defaultsrequiretty"
Hi List,
I've always been following along with the examples here:
http://docs.ansible.com/ansible/playbooks_conditionals.html#the-when-statement
for instance:
```
- name: Disable requiretty
lineinfile:
dest: /etc/sudoers
regexp: "Defaultsrequiretty"
line: "# Defaultsrequire