Re: [ansible-project] "Using bare variables is deprecated." but the docs are showing me to use that syntax.?

2016-05-12 Thread Brian Coca
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

Re: [ansible-project] "Using bare variables is deprecated." but the docs are showing me to use that syntax.?

2016-05-12 Thread Kai Stian Olstad
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

Re: [ansible-project] "Using bare variables is deprecated." but the docs are showing me to use that syntax.?

2016-05-11 Thread Mark Maas
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 > >

Re: [ansible-project] "Using bare variables is deprecated." but the docs are showing me to use that syntax.?

2016-05-11 Thread Kai Stian Olstad
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"

[ansible-project] "Using bare variables is deprecated." but the docs are showing me to use that syntax.?

2016-05-11 Thread Mark Maas
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