From cd63678545592ed035b0ee8d1559da2751f0c608 Mon Sep 17 00:00:00 2001 From: binary Date: Tue, 10 Nov 2020 22:35:02 +0100 Subject: In-progress multiple vms init --- playbooks/init_vm.yml | 11 ++++++++++- playbooks/init_vms.yml | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 playbooks/init_vms.yml diff --git a/playbooks/init_vm.yml b/playbooks/init_vm.yml index 414c0e4..2f6e027 100644 --- a/playbooks/init_vm.yml +++ b/playbooks/init_vm.yml @@ -1,8 +1,17 @@ # init_vm.yml +--- + - hosts: "{{ host }}" tasks: + + - include_role: + name: vmm + tasks_from: init_vm_alpine.yml + when: groups["alpine"] | select("search", guest) | list | length > 0 + - include_role: name: vmm - tasks_from: init_vm + tasks_from: init_vm_openbsd.yml + when: groups["openbsd"] | select("search", guest) | list | length > 0 diff --git a/playbooks/init_vms.yml b/playbooks/init_vms.yml new file mode 100644 index 0000000..3da35dc --- /dev/null +++ b/playbooks/init_vms.yml @@ -0,0 +1,11 @@ + +# init_vm.yml +# Initialize mutliple vms, with os-agnostic tasks + +--- + +- include: init_vm.yml + vars: + host: "{{ host }}" + guest: "{{ item }}" + loop: "{{ vms | select('search', 'iso') | list }}" -- cgit v1.2.3