-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcloud-init.cfg
52 lines (42 loc) · 1.05 KB
/
cloud-init.cfg
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
#cloud-config
hostname: ${hostname}
fqdn: ${fqdn}
manage_etc_hosts: true
users:
- default
- name: cmemb
gecos: cluster member
primary-group: cmember
lock_passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
groups: sudo, admin, users
home: /home/cmemb
shell: /bin/bash
ssh_authorized_keys:
- ${file("~/.ssh/id_rsa.pub")}
ssh_pwauth: false
disable_root: false
chpasswd:
list: |
cmemb:cmemb
expire: false
packages:
- qemu-guest-agent
# Configure networking
resolv_conf:
nameservers: ['200.0.5.1'] # Local network dns server
searchdomains:
- k8s.local
# Enable ipv4 forwarding, required on CIS hardened machines
write_files:
- path: /etc/sysctl.d/enabled_ipv4_forwarding.conf
content: |
net.ipv4.conf.all.forwarding=1
# every boot
bootcmd:
- [ sh, -c, 'echo $(date) | sudo tee -a /root/bootcmd.log' ]
# run once for setup
runcmd:
- [ sh, -c, 'echo $(date) | sudo tee -a /root/runcmd.log' ]
# written to /var/log/cloud-init-output.log
final_message: "The system is finall up, after $UPTIME seconds"