Add vm_guest additions role

This commit is contained in:
Ryan Cavicchioni 2019-10-05 16:41:25 -05:00
parent bdb914b03b
commit 2d0c10aa35
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
5 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
vm_guest_agent_package_state: present
vm_guest_agent_service_state: started
vm_guest_agent_service_enabled: yes

View File

@ -0,0 +1,11 @@
---
- name: install SPICE agent
package:
name: "{{ vm_guest_spice_agent_package_name }}"
state: "{{ vm_guest_spice_agent_package_state }}"
- name: start SPICE agent
service:
name: "{{ vm_guest_spice_agent_service_name }}"
state: "{{ vm_guest_spice_agent_service_state }}"
enabled: "{{ vm_guest_spice_agent_service_enabled }}"

View File

@ -0,0 +1,28 @@
---
- name: gather OS specific variables
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- name: gather virtualization specific variables
include_vars: "{{ item }}"
with_first_found:
"{{ ansible_virtualization_type }}.yaml"
- name: install guest agent
package:
name: "{{ vm_guest_agent_package_name }}"
state: "{{ vm_guest_agent_package_state }}"
- name: start guest agent
service:
name: "{{ vm_guest_agent_service_name }}"
state: "{{ vm_guest_agent_service_state }}"
enabled: "{{ vm_guest_agent_service_enabled }}"
- name: run virtualization specific tasks
include: "{{ item }}"
with_first_found:
"{{ ansible_virtualization_type }}.yaml"

View File

@ -0,0 +1 @@
---

View File

@ -0,0 +1,10 @@
---
vm_guest_agent_package_name: qemu-guest-agent
vm_guest_agent_service_name: qemu-guest-agent
vm_guest_spice_agent_package_name: spice-vdagent
vm_guest_spice_agent_service_name: spice-vdagent
vm_guest_spice_agent_package_state: present
vm_guest_spice_agent_service_state: started
vm_guest_spice_agent_service_enabled: yes