From 953f116b6f125d1944446560780ff16fcda7bffb Mon Sep 17 00:00:00 2001 From: Alexander Dahl Date: Fri, 22 Jul 2022 21:45:05 +0200 Subject: [PATCH 1/3] inventory: Define a group with all VMs running on proxmox (beaker) Want to install some package for those hosts only. --- inventory.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inventory.yml b/inventory.yml index aece11d..c849471 100644 --- a/inventory.yml +++ b/inventory.yml @@ -89,3 +89,12 @@ all: 3765613264626637660a343562363166313535613964336261356530353732333965313830653865 39373837643837663630333765306463616234363535613666333862396632643961 oganesson.n39.eu: + + children: + proxmox: + hosts: + pottwal.n39.eu: + unicorn.n39.eu: + radon.n39.eu: + krypton.n39.eu: + oganesson.n39.eu: From 01c8d9d896fba93520feecefb79bec04d1f1d534 Mon Sep 17 00:00:00 2001 From: Alexander Dahl Date: Fri, 22 Jul 2022 21:46:12 +0200 Subject: [PATCH 2/3] main: Install qemu-guest-agent on proxmox VMs proxmox UI can show more VM specific information if qemu-guest-agent is installed in guest VMs. --- main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.yml b/main.yml index e33808c..b6908db 100644 --- a/main.yml +++ b/main.yml @@ -35,6 +35,16 @@ include_role: name: users +- hosts: proxmox + become: true + + tasks: + + - name: Ensure qemu guest agent is installed on proxmox VMs + ansible.builtin.apt: + pkg: qemu-guest-agent + state: present + - name: Tau specific setup import_playbook: tau.yml From 0bebf35471302220a44aeba5372f1f51d354b922 Mon Sep 17 00:00:00 2001 From: Alexander Dahl Date: Sat, 23 Jul 2022 20:42:11 +0200 Subject: [PATCH 3/3] Move proxmox specific tasks to separate playbook Suggested-by: Stefan Haun --- main.yml | 11 ++--------- proxmox.yml | 9 +++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 proxmox.yml diff --git a/main.yml b/main.yml index b6908db..88c86ef 100644 --- a/main.yml +++ b/main.yml @@ -35,15 +35,8 @@ include_role: name: users -- hosts: proxmox - become: true - - tasks: - - - name: Ensure qemu guest agent is installed on proxmox VMs - ansible.builtin.apt: - pkg: qemu-guest-agent - state: present +- name: Specific setup for all proxmox hosts + import_playbook: proxmox.yml - name: Tau specific setup import_playbook: tau.yml diff --git a/proxmox.yml b/proxmox.yml new file mode 100644 index 0000000..6ec32bb --- /dev/null +++ b/proxmox.yml @@ -0,0 +1,9 @@ +--- +- hosts: proxmox + become: true + + tasks: + - name: Ensure qemu guest agent is installed on proxmox VMs + ansible.builtin.apt: + pkg: qemu-guest-agent + state: present