Re: [ansible-project] fatal error when skipping includes

2015-08-19 Thread senorsmile
Ultimately fixed this by simply putting this into the role's defaults/main.yml nagios_host_fqdns_flat: ([]) On Wednesday, August 19, 2015 at 10:20:38 AM UTC-7, senorsmile wrote: > > A! Thanks Serge. So it is applying in the same manner as roles apply > args (e.g. tags: ). > > So, now t

Re: [ansible-project] fatal error when skipping includes

2015-08-19 Thread senorsmile
A! Thanks Serge. So it is applying in the same manner as roles apply args (e.g. tags: ). So, now to figure out how to default a split(). On Wednesday, August 19, 2015 at 10:09:32 AM UTC-7, Serge van Ginderachter wrote: > > > On 19 August 2015 at 19:02, senorsmile > > wrote: > >> the

Re: [ansible-project] fatal error when skipping includes

2015-08-19 Thread Serge van Ginderachter
On 19 August 2015 at 19:02, senorsmile wrote: > the when: of the include: gets run AFTER the with_xxx of the child file? > This doesn't make any sense to me. If you are conditionally including a > file, NOTHING in that file should be processed. I am not being combative, > but am I missing somet

Re: [ansible-project] fatal error when skipping includes

2015-08-19 Thread senorsmile
@Brian, According to your comment in this issue: https://github.com/ansible/ansible/issues/11961 the when: of the include: gets run AFTER the with_xxx of the child file? This doesn't make any sense to me. If you are conditionally including a file, NOTHING in that file should be processed.

Re: [ansible-project] fatal error when skipping includes

2015-08-19 Thread senorsmile
And I've run into this bug yet again! I have the following which fails on skipped hosts: - name: Check all other host certs connection: local sudo: false stat: path: "{{ role_path }}/templates/ca/{{ item }}.crt" with_items: "{{ (nagios_host_fqdns_flat|default([])).split(',')|defa

Re: [ansible-project] fatal error when skipping includes

2015-08-13 Thread senorsmile
Ah, great catch. That actually works. Now, to convince ansible not to evaluate anything in included files which are skipped... On Thursday, August 13, 2015 at 5:46:11 PM UTC-7, Brian Coca wrote: > > try: > with_items: "{{ ((the_files|default([])).stdout_lines|default([])) | > list }}" >

Re: [ansible-project] fatal error when skipping includes

2015-08-13 Thread Brian Coca
try: with_items: "{{ ((the_files|default([])).stdout_lines|default([])) | list }}" -- Brian Coca -- 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 ansible-

Re: [ansible-project] fatal error when skipping includes

2015-08-13 Thread senorsmile
I'm not sure I follow you. The include is being skipped since the when: condition isn't met. All other tasks above the one that errs out shows skipped. It's just that specific task that makes everything fail for that host. I have attempted to add a 'default' filter to the when:, but it see

Re: [ansible-project] fatal error when skipping includes

2015-08-13 Thread Brian Coca
the include itself is not skippable, the when gets added to the included tasks. -- Brian Coca -- 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 ansible-pro

[ansible-project] fatal error when skipping includes

2015-08-13 Thread senorsmile
Error: fatal: [myhost] => with_items expects a list or a set I have a role with the following tasks(snippets included): tasks/main.yml --- - include: server.yml when: icinga_install_mode == 'server' tasks/server.yml --- . - name: Get filenames connection: local shell: find ./roles/ro