#cloud-config # # Example: install and configure linux-manager during first boot, with a root # CA the package creates. The template variables are Terraform templatefile() # placeholders; trusted_cas holds the PEM certificates of CAs added to the # trust store. hostname: ${hostname} fqdn: ${fqdn} manage_etc_hosts: false apt: sources: linux-manager: source: "deb [signed-by=/etc/apt/keyrings/linux-manager.asc] ${repo_url} ${ubuntu_codename} main" key: | ${indent(8, trimspace(repo_gpg_key))} write_files: - path: /etc/linux-manager/linux-manager.json permissions: '0600' owner: root:root content: | ${jsonencode(config)} %{ if length(trusted_cas) > 0 ~} ca_certs: trusted: %{ for ca in trusted_cas ~} - | ${indent(6, trimspace(ca))} %{ endfor ~} %{ endif ~} package_update: true packages: - linux-manager