diff options
author | 2019-06-04 12:47:20 +0200 | |
---|---|---|
committer | 2019-06-04 12:47:20 +0200 | |
commit | 76e017afde67940e80efeaec546c04bef2dadff2 (patch) | |
tree | 885df0233f8bf50b3e921b03dc318f4ef3442c43 /patches/onap-patch-role/tasks | |
parent | 8636d184d6c07df9ef74941a0d4343d61b95c5d4 (diff) |
Replace 'with_items' loop statements with 'loop' keyword
As of Ansible 2.5 'loop' keyword is a recommended way
for looping statements instead of 'with_dict'.
Change-Id: I19e00cc27e13955e2056840fd4ce99841bc824ad
Issue-ID: OOM-1887
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'patches/onap-patch-role/tasks')
-rw-r--r-- | patches/onap-patch-role/tasks/main.yml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/onap-patch-role/tasks/main.yml b/patches/onap-patch-role/tasks/main.yml index fb81f200..38d0ab92 100644 --- a/patches/onap-patch-role/tasks/main.yml +++ b/patches/onap-patch-role/tasks/main.yml @@ -4,14 +4,14 @@ - name: Check presence of files for NPM patching stat: path: "{{ app_helm_charts_infra_directory }}/{{ item }}" - with_items: + loop: - common/dgbuilder/templates/deployment.yaml register: npm_files_check - name: Check presence of files for nexus domain resolving stat: path: "{{ app_helm_charts_infra_directory }}/{{ item }}" - with_items: + loop: - oof/charts/oof-cmso/charts/oof-cmso-service/resources/config/msosimulator.sh register: hosts_files_check @@ -22,7 +22,7 @@ line: '\g<1>npm set registry "http://nexus.{{ ansible_nodename }}/repository/npm-private/";' backrefs: yes state: present - with_items: "{{ npm_files_check.results }}" + loop: "{{ npm_files_check.results }}" when: item.stat.exists - name: Patch OOM - nexus domain resolving @@ -32,5 +32,5 @@ line: '\g<1>{{ cluster_ip }} {{ simulated_hosts.nexus | join(" ") }} >> /etc/hosts;' backrefs: yes state: present - with_items: "{{ hosts_files_check.results }}" + loop: "{{ hosts_files_check.results }}" when: item.stat.exists |