Finish docker network module

This commit is contained in:
2025-08-02 19:48:07 +02:00
parent 85c40c5644
commit a2256dbdb0
12 changed files with 130 additions and 286 deletions
@@ -0,0 +1,53 @@
#cloud-config
users:
- name: ${admin_user}
groups: users, admin, microk8s
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
ssh_authorized_keys:
- ${admin_public_ssh_key}
- name: terraform
groups: users, admin
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ${terraform_public_ssh_key}
package_update: true
package_upgrade: true
package_reboot_if_required: true
write_files:
- owner: root:root
content: "${packages_setup}"
path: /run/tmpfiles.d/install-packages.sh
encoding: base64
defer: true
- owner: root:root
content: "${firewall_setup}"
path: /run/tmpfiles.d/firewall-setup.sh
encoding: base64
defer: true
- owner: root:root
content: "${ssh_setup}"
path: /run/tmpfiles.d/ssh-setup.sh
encoding: base64
defer: true
- owner: root:root
content: "${sysctl_setup}"
path: /run/tmpfiles.d/sysctl-setup.sh
encoding: base64
defer: true
%{ if main_node ~}
- owner: root:root
content: "${swarm_setup}"
path: /run/tmpfiles.d/swarm-setup.sh
encoding: base64
defer: true
%{ endif ~}
runcmd:
- install /run/tmpfiles.d/*.sh /usr/local/bin
- /usr/local/bin/install-packages.sh
- /usr/local/bin/firewall-setup.sh
- /usr/local/bin/ssh-setup.sh
- /usr/local/bin/sysctl-setup.sh
%{ if main_node ~}
- /usr/local/bin/swarm-setup.sh
%{ endif ~}