You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k8s-terraform/cloud_init.cfg

43 lines
1.1 KiB
YAML

#cloud-config
# vim: syntax=yaml
users:
- name: admin
# If we don't supress the user group then cloud init will fail because there
# is allready an admin group in the ubuntu base image.
no_user_group: true
groups: users, admin, sudo
shell: /usr/bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ${admin-pub-key}
- name: root
ssh_authorized_keys:
- ${admin-pub-key}
ssh_pwauth: true
disable_root: false
chpasswd:
list:
- root:${admin-passwd}
- admin:${admin-passwd}
expire: false
hostname: ${hostname}
fqdn: ${hostname}
%{ if install-qemu-agent }
packages:
# This are only necessary for libvirt.
- qemu-guest-agent
runcmd:
# TODO At some point revisit this, this was added because it seemed like
# apparmor was causing dhclient to not get an IP address for ubuntu. This
# should be double checked.
- echo "/proc/*/task/*/comm wr," | tee -a /etc/apparmor.d/local/sbin.dhclient
# These are only necessary for libvirt.
- systemctl enable qemu-guest-agent
- systemctl start qemu-guest-agent
- systemctl status qemu-guest-agent
%{ endif }