-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathprovision.yml
57 lines (55 loc) · 1.46 KB
/
provision.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
- name: Provision Networks
tags: provision-networks
hosts: local
gather_facts: false
tasks:
- name: Provision networks
local_action:
module: rax_network
region: "{{rax_region}}"
username: "{{rax_username}}"
api_key: "{{rax_api_key}}"
label: "{{prefix}}-swift"
cidr: "172.20.0.0/24"
state: present
- name: Provision Hosts
tags: provision-hosts
hosts: "{{profile}}-template"
gather_facts: false
tasks:
- name: Provision hosts
tags: provision-hosts
local_action:
module: rax
name: "{{prefix}}-{{inventory_hostname}}"
keypair: "{{rax_keypair}}"
networks: "{{rax_net_labels}}"
region: "{{rax_region}}"
username: "{{rax_username}}"
api_key: "{{rax_api_key}}"
flavor: "{{rax_prov_flavor}}"
image: "{{rax_prov_image}}"
disk_config: "{{rax_diskconfig}}"
meta: { ansible_groups: "{{rax_groups}}" }
wait: yes
state: present
register: rax
- name: Provision Disks
tags: provision-disks
hosts: "{{profile}}-storage"
gather_facts: false
tasks:
- name: Provision disks
tags: provision-disks
local_action:
module: rax_cbs
attach_to: "{{prefix}}-{{inventory_hostname}}"
region: "{{rax_region}}"
username: "{{rax_username}}"
api_key: "{{rax_api_key}}"
cbs_name: "{{prefix}}-{{inventory_hostname}}"
cbs_size: 100
cbs_type: SATA
wait: yes
state: present