Hi all,
I have a role with some shell tasks + 2 include: of some yaml files that also contain shell tasks. the first tasks are skipped as per condition but the include: are not
Here is the small playbook:
---
- name: test eden deploy
hosts: ACEDV-LM-01
sudo: True
roles:
- { role: check_eden, when: ansible_hostname != "ACEDV-LM-01", tags: pre, param: pre }
Here is the role (partial):
- name: get the date for naming purpose
shell: date +%Y%m%d-%HH%MM%SS
register: dateext
- include: /etc/ansible/roles/check_nagios/tasks/main.yml
- include: /etc/ansible/roles/check_nagios/tasks/main.yml
The first task is skipped plus some other from the include but the rest are not:
Here is the error:
fatal: [ACEDV-LM-01] => with_items expects a list or a set
This error is from the include that uses some with_items: "{{ variable.stdout_lines }}" in a shell tasks but they are not skipped.
Why aren't all the tasks skipped ???
How to do it right ?
Ansible version is 1.9.4 on a redhat 6.7 system
Thank you
Adi