]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Pass list of packages instead of with_items 2030/head
authorMajor Hayden <major@mhtx.net>
Wed, 11 Oct 2017 17:18:12 +0000 (12:18 -0500)
committerMajor Hayden <major@mhtx.net>
Wed, 11 Oct 2017 17:18:15 +0000 (12:18 -0500)
Modern versions of Ansible can handle a list of packages passed
directly to the package modules. This patch optimizes the package
install process by passing the list of packages directly to the
module.

roles/ceph-common/tasks/installs/install_redhat_packages.yml

index beafd0d0a6d6217004ddd29a3660658cf3c3ae3d..989dd3f888bd901ed61d55d76a4288b997cb2f26 100644 (file)
@@ -1,17 +1,15 @@
 ---
 - name: install redhat dependencies
   package:
-    name: "{{ item }}"
+    name: "{{ redhat_package_dependencies }}"
     state: present
-  with_items: "{{ redhat_package_dependencies }}"
   when:
     - ansible_distribution == 'RedHat'
 
 - name: install centos dependencies
   yum:
-    name: "{{ item }}"
+    name: "{{ centos_package_dependencies }}"
     state: present
-  with_items: "{{ centos_package_dependencies }}"
   when:
     - ansible_distribution == 'CentOS'