Merge pull request #67 from tyll/package_facts

Work around slow package manager
This commit is contained in:
Till Maas 2018-07-09 11:20:49 +02:00 committed by GitHub
commit 61557e05e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,10 +7,19 @@
- "{{ ansible_os_family }}.yml"
- "default.yml"
# needed for ansible_facst.packages
- name: Check which packages are installed
package_facts:
# Depending on the plugins, checking installed packages might be slow
# for example subscription manager might slow this down
# Therefore install packages only when rpm does not find them
- name: Install packages
package:
name: "{{ network_packages }}"
state: present
when:
- not network_packages is subset(ansible_facts.packages.keys())
- name: Enable network service
service: