-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstance-floating-volume.yaml
61 lines (57 loc) · 1.79 KB
/
instance-floating-volume.yaml
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
58
59
60
61
- hosts: localhost
tasks:
- name: create volume
os_volume:
state: present
size: 1
display_name: "volume-{{image}}"
- name: "deploy instance {{image}}"
os_server:
state: present
name: "makina-{{image}}"
image: "{{image}}"
flavor: m1.small
security_groups: admin
key_name: "{{keyname}}"
boot_from_volume: True
volume_size: 5
volumes: "volume-{{image}}"
auto_ip: yes
nics:
- net-name: flat-net
userdata: |
#cloud-config
hostname: makina-{{image}}
fqdn: makina-{{image}}.lab.local
manage_etc_hosts: true
debug: true
package_upgrade: true
users:
- default
- name: stack
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
groups: wheel,adm
ssh_pwauth: True
ssh_authorized_keys:
- {{IDRSAPUB}}
- name: root
ssh_authorized_keys:
- {{IDRSAPUB}}
ssh_pwauth: True
disable_root: false
chpasswd:
list: |
root:toor
stack:stack
expire: false
packages:
- tmux
- git
fs_setup:
- label: None
filesystem: 'ext4'
device: '/dev/vdc'
partition: 'auto'
mounts:
- [ /dev/vdc, /volume-makina-{{image}}, "ext4", "defaults,noatime"]
mount_default_fields: [ None, None, "ext4", "defaults,noatime", "0","2" ]