Hi !
Is there any way to omit a item in a list at the declaration ?
- name: "Test"
hosts: localhost
vars:
test1: false
test2:
- name: test21
includes:
- { file: "file221.j2", path: "/somewhere/" }
- { file: "file222.j2", path: "/somewhere/" }
- "{{ ( test1 | ternary ({ 'file': 'file223.j2', 'path':
'/somewhere/' }, *omit*) ) }}"
tasks:
- debug:
var: test2
- debug:
msg: "{{ item.1.path + item.1.file }}"
with_subelements:
- "{{ test2 }}"
- "includes"
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/72bce2e1-b27d-4e30-a207-53e866a59896%40googlegroups.com.