-
Notifications
You must be signed in to change notification settings - Fork 0
/
create.yml
39 lines (39 loc) · 897 Bytes
/
create.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- name: "Download Ubuntu"
hosts: "localhost"
gather_facts: no
vars:
cc_action: "download"
roles:
- { role: ubuntu }
- name: "Upload Ubuntu"
hosts: "localhost"
gather_facts: no
vars:
cc_action: "upload"
roles:
- { role: hyperv_ssh, when: cc_hypervisor == 'hyperv_ssh' }
- { role: pve_ssh, when: cc_hypervisor == 'pve_ssh' }
- name: "Create VM"
hosts: "all"
gather_facts: no
serial: 1
vars:
cc_action: "create"
roles:
- { role: pve_ssh, when: cc_hypervisor == 'pve_ssh' }
- name: "Modify VM"
hosts: "all"
gather_facts: no
vars:
cc_action: "modify"
roles:
- { role: pve_ssh, when: cc_hypervisor == 'pve_ssh' }
- name: "Create VM"
hosts: "all"
gather_facts: no
vars:
cc_action: "create"
roles:
- { role: hyperv_ssh, when: cc_hypervisor == 'hyperv_ssh' }
- { role: vsphere, when: cc_hypervisor == 'vsphere' }