aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-07-30 12:20:02 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2020-08-10 14:30:34 +0000
commita5b89b132a5b681ce0e81e46216443d0307c789f (patch)
tree1fe962268202e281a9b28bbeeb1b6b935f4c781f
parent6377d6819623690b6295228fba5248925940f20b (diff)
Replace deprecated "with_items" with loops
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>
-rw-r--r--deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml3
-rw-r--r--deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/main.yml2
-rw-r--r--deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_securitygroup/tasks/main.yml2
-rw-r--r--deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml3
-rw-r--r--deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_keypair/tasks/main.yml2
-rw-r--r--deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_network/tasks/main.yml2
-rw-r--r--deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_securitygroup/tasks/main.yml2
7 files changed, 7 insertions, 9 deletions
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml
index f79314c72..731bca04f 100644
--- a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml
+++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml
@@ -1,4 +1,3 @@
---
- include: create_host.yml host={{ item }}
- with_items:
- - "{{ hosts }}"
+ loop: "{{ hosts }}"
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/main.yml
index 5c8af745f..5e3ef67f5 100644
--- a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/main.yml
+++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_network/tasks/main.yml
@@ -1,4 +1,4 @@
---
- include: create_network.yml net={{ item }}
- with_items:
+ loop:
- "{{ network }}"
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_securitygroup/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_securitygroup/tasks/main.yml
index da125cbc4..3ce0e182b 100644
--- a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_securitygroup/tasks/main.yml
+++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_securitygroup/tasks/main.yml
@@ -1,4 +1,4 @@
---
- include: create_securitygroup.yml secgrp={{ item }}
- with_items:
+ loop:
- "{{ securitygroup }}"
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml
index eddf09736..5ce130d44 100644
--- a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml
+++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml
@@ -1,4 +1,3 @@
---
- include: destroy_host.yml host={{ item }}
- with_items:
- - "{{ hosts }}"
+ loop: "{{ hosts }}"
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_keypair/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_keypair/tasks/main.yml
index b106ee0cd..6025b82b3 100644
--- a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_keypair/tasks/main.yml
+++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_keypair/tasks/main.yml
@@ -7,6 +7,6 @@
file:
state: absent
path: "{{ item }}"
- with_items:
+ loop:
- "~/.ssh/{{ keypair.name }}.pub"
- "~/.ssh/{{ keypair.name }}"
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_network/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_network/tasks/main.yml
index 1bfab0d00..e52dcbdb8 100644
--- a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_network/tasks/main.yml
+++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_network/tasks/main.yml
@@ -1,4 +1,4 @@
---
- include: destroy_network.yml net={{ item }}
- with_items:
+ loop:
- "{{ network }}"
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_securitygroup/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_securitygroup/tasks/main.yml
index 586e18067..de098afec 100644
--- a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_securitygroup/tasks/main.yml
+++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_securitygroup/tasks/main.yml
@@ -1,4 +1,4 @@
---
- include: destroy_securitygroup.yml secgrp={{ item }}
- with_items:
+ loop:
- "{{ securitygroup }}"