DONT use with_items with yum module 38/82638/1
authorAnil Belur <abelur@linuxfoundation.org>
Fri, 21 Jun 2019 04:37:27 +0000 (14:37 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Fri, 21 Jun 2019 05:30:10 +0000 (15:30 +1000)
This fixes deprecation warning to invoke yum module without
with_items. Using with_items is slower and not recommended.

[DEPRECATION WARNING]: Invoking "yum" only once while using a loop
via squash_actions is deprecated. Instead of using a loop to supply
multiple items and specifying `name: {{item}}`, please use
`name: [u'{{sed_output.stdout_lines }}']` and remove the loop.
This feature will be removed in version 2.11.

Change-Id: Ie2c95d54d4ddf59cfc65d4b74cc4008ff4929218
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
packer/provision/devstack-pre-pip.yaml

index b70b2bdfe12bbbaf839f2efdea1ec26859811ed3..cd31a6298a4f663bd45208850eb49c4b44f13908 100644 (file)
@@ -65,9 +65,9 @@
           args:
             warn: False
         - name: "Install non-baseline requirements for {{ os_branch }}"
-          yum: 'name={{item}} state=present'
-          with_items:
-            - "{{ sed_output.stdout_lines }}"
+          yum:
+            name: "{{ sed_output.stdout_lines }}"
+            state: present
           become: true
         - name: git clone openstack core projects
           git: repo='https://github.com/openstack/{{ item }}.git'