-
Notifications
You must be signed in to change notification settings - Fork 0
/
userdata
42 lines (38 loc) · 888 Bytes
/
userdata
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
#cloud-config
hostname: ${hostname}
fqdn: ${hostname}.${domainname}
username: ${username}
ssh_authorized_keys:
- ${ssh_public_key}
manage_etc_hosts: true
packages:
- vim
- tmux
- curl
- apg
- etckeeper
# unatted-upgrades
apt:
conf: |
Unattended-Upgrade {
AutoFixInterruptedDpkg "true";
MinimalSteps "true";
Remove-Unused-Kernel-Packages "true";
Remove-New-Unused-Dependencies "true";
Automatic-Reboot "true";
};
# Ensure latest package upgrades installed
package_upgrade: true
# reboot after installation if required
packages_reboot_if_required: true
# run commands
runcmd:
- "etckeeper commit -m cloud-init-start"
# clean boot into new system after 1min
power_state:
delay: "+1"
mode: reboot
message: final reboot in 1min
timeout: 30
condition: True
final_message: "The cloud-init finished after $UPTIME seconds"