mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
Work around slow package manager
This commit is contained in:
parent
b52193984f
commit
3e8cb619b8
1 changed files with 9 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue