diff options
-rw-r--r-- | playbooks/init_vm.yml | 11 | ||||
-rw-r--r-- | playbooks/init_vms.yml | 11 |
2 files changed, 21 insertions, 1 deletions
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 }}" |