From 9d62630303b7ab644f38000326eb98dbb37c95dc Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 11 Oct 2017 12:18:12 -0500 Subject: [PATCH] Pass list of packages instead of with_items 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. --- .../ceph-common/tasks/installs/install_redhat_packages.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/roles/ceph-common/tasks/installs/install_redhat_packages.yml b/roles/ceph-common/tasks/installs/install_redhat_packages.yml index beafd0d0a..989dd3f88 100644 --- a/roles/ceph-common/tasks/installs/install_redhat_packages.yml +++ b/roles/ceph-common/tasks/installs/install_redhat_packages.yml @@ -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'