As of Ansible 2.5+, the recommended way to perform loops is to use the
new "loop" keyword instead of "with_*" style loops [1].
This issue was reported by:
Bartek Grzybowski <b.grzybowski@partner.samsung.com>
[1] https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html
Issue-ID: INT-1601
Change-Id: Icf9079fc5c22ac034631397ea46d2b03fb4298ab
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
---
- include: create_host.yml host={{ item }}
- with_items:
- - "{{ hosts }}"
+ loop: "{{ hosts }}"
---
- include: create_network.yml net={{ item }}
- with_items:
+ loop:
- "{{ network }}"
---
- include: create_securitygroup.yml secgrp={{ item }}
- with_items:
+ loop:
- "{{ securitygroup }}"
---
- include: destroy_host.yml host={{ item }}
- with_items:
- - "{{ hosts }}"
+ loop: "{{ hosts }}"
file:
state: absent
path: "{{ item }}"
- with_items:
+ loop:
- "~/.ssh/{{ keypair.name }}.pub"
- "~/.ssh/{{ keypair.name }}"
---
- include: destroy_network.yml net={{ item }}
- with_items:
+ loop:
- "{{ network }}"
---
- include: destroy_securitygroup.yml secgrp={{ item }}
- with_items:
+ loop:
- "{{ securitygroup }}"