-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudinit
31 lines (30 loc) · 1.03 KB
/
cloudinit
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
## template: jinja
#cloud-config
packages: ['apt-transport-https', 'ca-certificates', 'curl', 'software-properties-common', 'gnupg-agent', 'docker-ce', 'docker-ce-cli', 'containerd.io', 'docker-compose', 'unbound', 'iptables-persistent']
package_update: true
package_upgrade: true
package_reboot_if_required: true
apt:
preserve_sources_list: true
sources:
docker-ce.list:
source: deb [arch=amd64] https://download.docker.com/linux/ubuntu $RELEASE stable
keyid: 0EBFCD88
write_files:
- path: /etc/netplan/50-cloud-init.yaml
permissions: '0644'
content: |
network:
version: 2
ethernets:
ens3:
dhcp4: true
dhcp4-overrides:
use-dns: false
nameservers:
addresses: [ "127.0.0.1" ]
addresses:
- {{ ds.meta_data.meta.static_ip }}/32
runcmd:
- netplan apply
- sudo update-alternatives --set editor /usr/bin/vim.basic