Skip to content

Instantly share code, notes, and snippets.

@varesa
Created October 20, 2019 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save varesa/a0a6f7afa6ec7a1d029a606db457c6e6 to your computer and use it in GitHub Desktop.
Save varesa/a0a6f7afa6ec7a1d029a606db457c6e6 to your computer and use it in GitHub Desktop.
---
extension_requests:
pp_preshared_key: "${psk}"
{
"network": "${base64encode_file(templates/network.tpl)}",
"network.encoding": "base64",
"local-hostname": "${hostname}"
}
version: 1
config:
- type: physical
name: ens192
subnets:
- type: static
address: ${address}
netmask: 255.255.255.0
gateway: ${gateway}
dns_nameservers:
- 10.0.110.30
- 10.60.10.30
dns_search:
- mydomain.fi
#cloud-config
write_files:
- encoding: b64
content: ${base64encode("role=${role}\n")}
path: /etc/puppetlabs/facter/facts.d/role.txt
- encoding: b64
content: ${base64encode_file(templates/csr_attributes.tpl)}
path: /etc/puppetlabs/puppet/csr_attributes.yaml
runcmd:
- [ '/bin/systemctl', 'start', 'puppet' ]
users:
- name: test
ssh_authorized_keys:
- ssh-rsa MAj1oT46xLncyEhlqjoAPqMg... user@otherhost
groups: wheel
guestinfo.metadata = "${base64encode_file(templates/metadata.tpl)}"
guestinfo.metadata.encoding = "base64"
guestinfo.userdata = "${base64encode_file(templates/userdata.tpl)}"
guestinfo.userdata.encoding = "base64"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment