mirror of
https://github.com/2martens/terraform.git
synced 2026-10-19 08:06:52 +02:00
Finish docker network module
This commit is contained in:
@@ -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 ~}
|
||||
Reference in New Issue
Block a user