fatal: [myhost] => with_items expects a list or a set
---
- include: server.yml
when: icinga_install_mode == 'server'---
.....
- name: Get filenames
connection: local
shell: find ./roles/rolename/templates/custom2/.....
register: the_files
- name: Sync files
template:
src: "custom2/{{ item }}.j2"
dest: "/etc/bla/{{ item }}"
with_items: "{{ the_files.stdout_lines | list }}"
.....
- 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(',')|default([]) }}"
register: stat_host_certsthe 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 something here? That seems like a real bug; the specific bug that I'm running into over and over again.
nagios_host_fqdns_flat: ([])