Improve package-install speed for default config

The ``ansible.conf`` file has an option for ``squash_actions`` which
affects the package module.  It improves performance by bypassing the
normal ``with_items`` loop so all the items are installed at once.  This
vastly improves performance.

However (sadly) current origin-ci does not utilize the ``ansible.conf``
file in the repo.  Work around this by forming all required packages
into a CSV list.  Same effect, less magic, and it doesn't depend on any
``ansible.conf`` setting.

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich 2017-11-07 11:57:50 -05:00
parent a1129fb651
commit 0f4019b490

View file

@ -1,10 +1,8 @@
---
- name: Make sure we have all required packages
package:
name: "{{ item }}"
state: present
with_items:
- name: Required packages are buffered so package module can install all at once
set_fact:
required_packages:
- container-selinux
- curl
- device-mapper-devel
@ -54,6 +52,11 @@
- socat
- tar
- wget
- name: Make sure we have all required packages
package:
name: "{{ required_packages | join(', ') }}"
state: present
async: 600
poll: 10