Thanks for the mega-fast response :) That works! - GS
On Thu, Nov 21, 2013 at 5:18 PM, Kahlil Hodgson < [email protected]> wrote: > maybe just check if its got the first element: > > - { include: tasks/repo_server.yml, when: listen_ips.0 is defined } > > Kahlil (Kal) Hodgson GPG: C9A02289 > Head of Technology (m) +61 (0) 4 2573 0382 > DealMax Pty Ltd (w) +61 (0) 3 9008 5281 > > Suite 1415 > 401 Docklands Drive > Docklands VIC 3008 Australia > > "All parts should go together without forcing. You must remember that > the parts you are reassembling were disassembled by you. Therefore, > if you can't get them together again, there must be a reason. By all > means, do not use a hammer." -- IBM maintenance manual, 1925 > > > > On 21 November 2013 17:16, Gonzalo Servat <[email protected]> wrote: > > Hi, > > > > My inventory script returns the correct JSON for a host including an > empty > > list for 'listen_ips', i.e: > > > > { "listen_ips": [] } > > > > I want to include a task only if the listen_ips list contains at least > one > > element. This doesn't work: > > > > - { include: tasks/repo_server.yml, when: listen_ips > 0 } > > > > Any ideas? > > > > Cheers > > GS > > > > > > -- > > 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]. > > For more options, visit https://groups.google.com/groups/opt_out. > > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
