-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser-data.tpl
68 lines (57 loc) · 1.42 KB
/
user-data.tpl
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
62
63
64
65
66
67
68
#cloud-config
growpart:
mode: auto
devices: ["/"]
ignore_growroot_disabled: false
resize_rootfs: noblock
chpasswd:
expire: false
ssh_pwauth: true
disable_root: false
# password can be generated with:
# echo "test" | mkpasswd -m sha-512 -s
users:
- default
- name: serra
shell: /bin/bash
sudo: ['ALL=(ALL) NOPASSWD:ALL']
groups: adm,wheel
passwd: ${serra_passwd}
lock_passwd: false
ssh_authorized_keys: ${serra_ssh_keys}
- name: root
passwd: ${root_passwd}
ssh_authorized_keys: ${root_ssh_keys}
timezone: Europe/London
# Disable selinux with overwriting conf file
write_files:
- encoding: b64
content: ${encoded_selinux}
owner: root:root
path: /etc/sysconfig/selinux
permissions: '0644'
- encoding: b64
content: ${encoded_eth0}
owner: root:root
path: /etc/sysconfig/network-scripts/ifcfg-eth0
permissions: '0644'
- encoding: b64
content: ${encoded_grub}
owner: root:root
path: /etc/default/grub
permissions: '0644'
- encoding: b64
content: ${encoded_rc_local}
owner: root:root
path: /etc/rc.d/rc.local
permissions: '0755'
- encoding: b64
content: ${encoded_rc_local_once}
owner: root:root
path: /etc/rc.d/rc.local.rebootonce
permissions: '0755'
# package_update: true
# Below upgrades packages
# package_upgrade: true
runcmd:
- [ /etc/rc.d/rc.local.rebootonce ] # Modify this line for the correct path