44 lines
1.3 KiB
Smarty
44 lines
1.3 KiB
Smarty
#cloud-config
|
|
#
|
|
# Example: install and configure vpn-router during first boot.
|
|
#
|
|
# This is one way to reach the state described in README.md, not an interface
|
|
# the package depends on. It writes the configuration file directly, which
|
|
# keeps everything in one place and works the same whether or not debconf is
|
|
# involved.
|
|
#
|
|
# Template variables are Terraform templatefile() placeholders. Adapt or drop
|
|
# them for whatever renders this file.
|
|
#
|
|
# This variant lets the package create its own CAs on first boot. See
|
|
# cloud-init-with-pki.yaml.tpl for the variant that supplies an existing root
|
|
# CA instead.
|
|
|
|
hostname: ${hostname}
|
|
fqdn: ${fqdn}
|
|
manage_etc_hosts: false
|
|
|
|
apt:
|
|
sources:
|
|
vpn-router:
|
|
source: "deb [signed-by=/etc/apt/keyrings/vpn-router.asc] ${repo_url} ${ubuntu_codename} main"
|
|
key: |
|
|
${indent(8, trimspace(repo_gpg_key))}
|
|
|
|
write_files:
|
|
# The configuration file. Created here before the package is installed, so
|
|
# postinst leaves it alone.
|
|
- path: /etc/vpn-router/vpn-router.json
|
|
permissions: '0600'
|
|
owner: root:root
|
|
content: |
|
|
${jsonencode(config)}
|
|
|
|
package_update: true
|
|
|
|
packages:
|
|
- vpn-router
|
|
|
|
# Nothing further is required: installing the package starts
|
|
# vpn-router-setup, which applies the configuration written above.
|