Skip to content

Commit 2185458

Browse files
committed
Add support for Debian GNU/Linux and derivatives
1 parent d29a305 commit 2185458

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed

meta/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ galaxy_info:
1111
- name: EL
1212
versions:
1313
- 7
14+
- name: Ubuntu
15+
versions:
16+
- all
17+
- name: Debian
18+
versions:
19+
- all
1420
galaxy_tags:
1521
- cloud
1622
- kvm

tasks/install.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
---
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:
413
name: "{{ item }}"
514
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 }}"
1216
become: True
1317

1418
# NOTE: QEMU emulators are available in EPEL.
@@ -18,9 +22,10 @@
1822
state: installed
1923
when: libvirt_host_qemu_emulators | length > 0
2024
become: True
25+
when: ansible_os_family == "RedHat"
2126

2227
- name: Ensure QEMU emulator packages are installed
23-
yum:
28+
package:
2429
name: "{{ package }}"
2530
state: installed
2631
with_items: "{{ libvirt_host_qemu_emulators }}"

vars/Debian.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
# List of libvirt package dependencies.
3+
libvirt_host_libvirt_packages:
4+
- libvirt-bin
5+
- qemu-kvm

vars/RedHat.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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

0 commit comments

Comments
 (0)