Skip to content

Instantly share code, notes, and snippets.

@tfolbrecht
Created January 23, 2022 06:49
Show Gist options
  • Select an option

  • Save tfolbrecht/4db329886b12b37a3f319150d3ea9e18 to your computer and use it in GitHub Desktop.

Select an option

Save tfolbrecht/4db329886b12b37a3f319150d3ea9e18 to your computer and use it in GitHub Desktop.
#cloud-config
manage-resolv-conf: true
resolv_conf:
nameservers:
- '8.8.8.8'
- '8.8.4.4'
groups:
- ubuntu: [root,sys]
- docker
users:
- default
- name: ubuntu
gecos: tom
shell: /bin/bash
primary_group: ubuntu
sudo: ALL=(ALL) NOPASSWD:ALL
groups: sudo, ubuntu, docker
lock_passwd: false
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1ycblablahblah
runcmd:
- sudo apt-get update -y
- sudo apt-get install -y software-properties-common gnupg-agent curl apt-transport-https
- sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
- sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get install -y docker-ce docker-ce-cli containerd.io
- sudo systemctl start docker
- sudo systemctl enable docker
- su ubuntu
final_message: "The system is finally up, after $UPTIME seconds"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment