Creating a subset of an array in ansible -
my data file looks like
--- data: - item 1 - item 2 - item 3 - item 4
i want include taskbook item 1 , diferent taskbook item 2 - 4. how can create array ['item 2', 'item 3', 'item 4']
--- - hosts: localhost tasks: - include: taskbooks1.yml param={{data[0]}} - include: taskbooks2.yml param={{item}} with_indexed_items: "{{ data }}" # want pass list without item 1
- include: taskbooks2.yml param={{item}} with_items: "{{data[1:]}}"
Comments
Post a Comment