File tree Expand file tree Collapse file tree 4 files changed +37
-10
lines changed Expand file tree Collapse file tree 4 files changed +37
-10
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ galaxy_info:
11
11
- name : EL
12
12
versions :
13
13
- 7
14
+ - name : Ubuntu
15
+ versions :
16
+ - all
17
+ - name : Debian
18
+ versions :
19
+ - all
14
20
galaxy_tags :
15
21
- cloud
16
22
- kvm
Original file line number Diff line number Diff line change 1
1
---
2
- - name : Ensure the libvirt package is installed
3
- yum :
2
+
3
+ - name : gather os specific variables
4
+ include_vars : " {{ item }}"
5
+ with_first_found :
6
+ - " {{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml"
7
+ - " {{ ansible_distribution }}.yml"
8
+ - " {{ ansible_os_family }}.yml"
9
+ tags : vars
10
+
11
+ - name : Ensure libvirt packages are installed
12
+ package :
4
13
name : " {{ item }}"
5
14
state : installed
6
- with_items :
7
- - libvirt
8
- - libvirt-daemon-kvm
9
- - libvirt-python
10
- - python-lxml
11
- - qemu-kvm
15
+ with_items : " {{ libvirt_host_libvirt_packages }}"
12
16
become : True
13
17
14
18
# NOTE: QEMU emulators are available in EPEL.
15
19
- name : Ensure the EPEL repository is enabled
16
20
yum :
17
21
name : epel-release
18
22
state : installed
19
- when : libvirt_host_qemu_emulators | length > 0
20
23
become : True
24
+ when :
25
+ - ansible_os_family == "RedHat"
26
+ - libvirt_host_qemu_emulators | length > 0
21
27
22
28
- name : Ensure QEMU emulator packages are installed
23
- yum :
29
+ package :
24
30
name : " {{ package }}"
25
31
state : installed
26
32
with_items : " {{ libvirt_host_qemu_emulators }}"
Original file line number Diff line number Diff line change
1
+ ---
2
+ # List of libvirt package dependencies.
3
+ libvirt_host_libvirt_packages :
4
+ - libvirt-bin
5
+ - qemu-kvm
6
+ - python-libvirt
7
+ - python-lxml
Original file line number Diff line number Diff line change
1
+ ---
2
+ # List of libvirt package dependencies.
3
+ libvirt_host_libvirt_packages :
4
+ - libvirt
5
+ - libvirt-daemon-kvm
6
+ - libvirt-python
7
+ - python-lxml
8
+ - qemu-kvm
You can’t perform that action at this time.
0 commit comments