TerraHome/terraform/files/cloud_init_global.yaml

19 lines
877 B
YAML
Raw Normal View History

2025-04-17 22:24:54 +01:00
#cloud-config
hostname: ${hostname}
fqdn: ${hostname}.${domain}
2025-04-17 22:50:43 +01:00
#cloud-config
# The above header must generally appear on the first line of a cloud config
# file, but all other lines that begin with a # are optional comments.
2025-04-17 22:24:54 +01:00
runcmd:
2025-04-17 22:50:43 +01:00
# One-command install, from https://tailscale.com/download/
- ['sh', '-c', 'curl -fsSL https://tailscale.com/install.sh | sh']
# Set sysctl settings for IP forwarding (useful when configuring an exit node)
- ['sh', '-c', "echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf && echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf && sudo sysctl -p /etc/sysctl.d/99-tailscale.conf" ]
# Generate an auth key from your Admin console
# https://login.tailscale.com/admin/settings/keys
# and replace the placeholder below
- ['tailscale', 'up', '--auth-key=${TS_AUTHKEY}']
2025-04-17 22:24:54 +01:00