Files
terraform-binarylane/modules/binarylane/cloud-init.yaml.tftpl
T
unkin-agent 0ee9dac5b0
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline failed
Add mta1/mta2 DMZ mail gateways with WireGuard bootstrap
2026-10-12 21:50:09 +11:00

38 lines
1.3 KiB
Plaintext

#cloud-config
hostname: ${hostname}
fqdn: ${fqdn}
prefer_fqdn_over_hostname: true
write_files:
- path: /etc/wireguard/wg0.conf
permissions: "0600"
content: |
[Interface]
Address = ${wg_address}/24
ListenPort = ${wg_port}
PrivateKey = ${wg_private_key}
[Peer]
PublicKey = ${hub_public_key}
Endpoint = ${hub_endpoint}
AllowedIPs = ${allowed_ips}
PersistentKeepalive = 25
- path: /etc/NetworkManager/conf.d/90-dns-none.conf
content: |
[main]
dns=none
runcmd:
- dnf install -y wireguard-tools
- systemctl enable --now wg-quick@wg0
- systemctl reload NetworkManager
- printf 'search main.unkin.net\nnameserver 198.18.200.7\n' > /etc/resolv.conf
- rpm -q puppet-agent || dnf install -y https://yum.puppet.com/puppet8-release-el-9.noarch.rpm
- dnf install -y puppet-agent
- /opt/puppetlabs/bin/puppet config set --section main certname ${fqdn}
- /opt/puppetlabs/bin/puppet config set --section main server puppet.k8s.syd1.au.unkin.net
- /opt/puppetlabs/bin/puppet config set --section main ca_server puppetca.k8s.syd1.au.unkin.net
- /opt/puppetlabs/bin/puppet config set --section main report_server puppet.k8s.syd1.au.unkin.net
- /opt/puppetlabs/bin/puppet config set --section main environment production
- systemctl enable --now puppet