diff --git a/terraform/configs/cloud-init/control-plane.yaml.tpl b/terraform/configs/cloud-init/control-plane.yaml.tpl new file mode 100644 index 0000000..18e1e67 --- /dev/null +++ b/terraform/configs/cloud-init/control-plane.yaml.tpl @@ -0,0 +1,32 @@ +#cloud-config +hostname: control-plane +manage_etc_hosts: false + +users: + - name: ubuntu + gecos: ubuntu + sudo: ALL=(ALL) NOPASSWD:ALL + lock_passwd: false + ssh_pwauth: true + shell: /bin/bash + ssh_authorized_keys: + - ${ssh_public_key} + +ssh_pwauth: true +chpasswd: + list: | + ubuntu:ubuntu + expire: false + +growpart: + mode: auto + devices: ["/"] + +package_update: false +package_upgrade: false + +write_files: + - path: /etc/hosts + append: true + encoding: b64 + content: ${hosts_file} diff --git a/terraform/configs/cloud-init/network.yaml.tpl b/terraform/configs/cloud-init/network.yaml.tpl new file mode 100644 index 0000000..4f28fb2 --- /dev/null +++ b/terraform/configs/cloud-init/network.yaml.tpl @@ -0,0 +1,16 @@ +#cloud-config +network: + version: 2 + ethernets: + enp1s0: + dhcp4: false + dhcp6: false + addresses: + - "${ipv4_address}/${ipv4_prefix}" + - "${ipv6_address}/${ipv6_prefix}" + gateway4: "${ipv4_gateway}" + gateway6: "${ipv6_gateway}" + nameservers: + addresses: + - "1.1.1.1" + - "2606:4700:4700::1111" diff --git a/terraform/configs/cloud-init/worker.yaml.tpl b/terraform/configs/cloud-init/worker.yaml.tpl new file mode 100644 index 0000000..79869af --- /dev/null +++ b/terraform/configs/cloud-init/worker.yaml.tpl @@ -0,0 +1,32 @@ +#cloud-config +hostname: worker +manage_etc_hosts: false + +users: + - name: ubuntu + gecos: ubuntu + sudo: ALL=(ALL) NOPASSWD:ALL + lock_passwd: false + ssh_pwauth: true + shell: /bin/bash + ssh_authorized_keys: + - ${ssh_public_key} + +ssh_pwauth: true +chpasswd: + list: | + ubuntu:ubuntu + expire: false + +growpart: + mode: auto + devices: ["/"] + +package_update: false +package_upgrade: false + +write_files: + - path: /etc/hosts + append: true + encoding: b64 + content: ${hosts_file}