Last active
December 24, 2021 22:51
-
-
Save sdktr/85d5cd8f01230ea084b71330af755190 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
## template: jinja | |
#cloud-config | |
{% if v1.distro_release == 'focal' %} | |
users: | |
- name: sdktr | |
shell: /usr/bin/bash | |
ssh_import_id: gh:sdktr | |
sudo: ALL=(ALL:ALL) NOPASSWD:ALL | |
chpasswd: | |
expire: false | |
apt_upgrade: true | |
apt: | |
sources: | |
tailscale: | |
source: deb [trusted=yes] https://pkgs.tailscale.com/stable/ubuntu focal main | |
packages: | |
- docker.io | |
- python-is-python3 | |
- build-essential | |
- python3-pip | |
- p7zip-full | |
- traceroute | |
- tailscale | |
- iperf3 | |
- tmux | |
- iftop | |
- unzip | |
- whois | |
- curl | |
- file | |
- htop | |
- tree | |
- wget | |
- git | |
- mtr | |
- jq | |
runcmd: | |
- tailscale up -authkey='<% TS_AUTHKEY %>' | |
- ufw --force reset | |
- ufw allow in on tailscale0 to any | |
- ufw --force enable | |
- sed -i '1i PermitRootLogin no' /etc/ssh/sshd_config | |
- sed -i '1i PasswordAuthentication no' /etc/ssh/sshd_config | |
- sed -i '1i ClientAliveInterval 5' /etc/ssh/sshd_config | |
- systemctl --no-block restart sshd | |
- apt-get install -y bridge-utils iproute2 python3-ipy socat qemu-kvm tcpdump ssh inetutils-ping dnsutils telnet genisoimage | |
# create the docker group | |
groups: | |
- docker | |
# Add default auto created user to docker group | |
system_info: | |
default_user: | |
groups: [docker] | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment