diff options
author | binary <me@rgoncalves.se> | 2020-11-10 22:35:02 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2020-11-10 22:35:02 +0100 |
commit | cd63678545592ed035b0ee8d1559da2751f0c608 (patch) | |
tree | 9a96750b6ebed6aa3500f4af20b839c86227ca8a | |
parent | 4378ef168bb3700b7ccafecdfb6914f4fd58f28c (diff) | |
download | infrastructure-cd63678545592ed035b0ee8d1559da2751f0c608.tar.gz |
In-progress multiple vms init
-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 }}" |