Created
September 17, 2020 13:15
-
-
Save bnason/3e268a73adb1d330cb575e7084b19080 to your computer and use it in GitHub Desktop.
user-data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
autoinstall: | |
version: 1 | |
refresh-installer: | |
channel: edge | |
update: yes | |
locale: en_US | |
keyboard: | |
layout: en | |
variant: us | |
identity: | |
hostname: master-template | |
username: toor | |
password: '$6$2/K9v/YY$sUj6Hekl9QW859sV9MxRPtnUwVgQWJAGYcHF6jMvwGKarrOGLwJZpERQVJuhDuzlTZJy8nc2n8YtzIm2RIF6J0' | |
user-data: | |
disable_root: false | |
users: | |
- name: toor | |
password: '$6$2/K9v/YY$sUj6Hekl9QW859sV9MxRPtnUwVgQWJAGYcHF6jMvwGKarrOGLwJZpERQVJuhDuzlTZJy8nc2n8YtzIm2RIF6J0' | |
lock_passwd: false | |
groups: [users, adm, sudo, docker] | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
shell: /bin/bash | |
ssh: | |
install-server: yes | |
allow-pw: yes | |
storage: | |
swap: | |
size: 0 | |
layout: | |
name: direct | |
early-commands: | |
- systemctl stop ssh # otherwise packer tries to connect and exceed max attempts | |
late-commands: | |
- echo 'toor ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/toor | |
- sed -ie 's/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX="net.ifnames=0 ipv6.disable=1 biosdevname=0"/' /target/etc/default/grub | |
- curtin in-target --target /target update-grub2 | |
# - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' | |
- touch /target/etc/cloud/cloud-init.disabled | |
apt: | |
sources: | |
docker: | |
source: deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable | |
keyid: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 | |
kubernetes: | |
source: deb https://apt.kubernetes.io/ kubernetes-xenial main | |
keyid: 54A647F9048D5688D7DA2ABE6A030B21BA07F4FB | |
packages: | |
- python3 | |
- nfs-common | |
- docker-ce | |
- docker-ce-cli | |
- containerd.io | |
# - kubelet=1.19.1-00 | |
# - kubeadm=1.19.1-00 | |
# - kubectl=1.19.1-00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment