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
--
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].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/9ec018c8-c96f-4e2a-a456-bd3e9c674904%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.