40 lines
1.3 KiB
Smarty
40 lines
1.3 KiB
Smarty
#cloud-config
|
|
|
|
users:
|
|
- name: serguzim
|
|
gecos: Serguzim
|
|
groups: users,admin,wheel
|
|
sudo: "ALL=(ALL) ALL"
|
|
shell: /bin/bash
|
|
lock_passwd: false
|
|
ssh_authorized_keys:
|
|
- "${default_ssh_key}"
|
|
- name: ansible
|
|
gecos: Ansible User
|
|
groups: users,admin,wheel
|
|
sudo: "ALL=(ALL) NOPASSWD:ALL"
|
|
shell: /bin/bash
|
|
lock_passwd: true
|
|
ssh_authorized_keys:
|
|
- "${default_ssh_key}"
|
|
|
|
packages:
|
|
- git
|
|
- vim
|
|
|
|
runcmd:
|
|
############################################################
|
|
### Configure sshd ### Configure sshd ### Configure sshd ###
|
|
############################################################
|
|
- sed -i 's/\#\?Port .\+/Port 17/' /etc/ssh/sshd_config
|
|
- sed -i 's/\#\?PasswordAuthentication .\+/PasswordAuthentication no/' /etc/ssh/sshd_config
|
|
- sed -i 's/\#\?PermitRootLogin .\+/PermitRootLogin no/' /etc/ssh/sshd_config
|
|
- systemctl restart sshd
|
|
|
|
#####################################################################
|
|
### Install tailscale ### Install tailscale ### Install tailscale ###
|
|
#####################################################################
|
|
# One-command install, from https://tailscale.com/download/
|
|
- ['sh', '-c', 'curl -fsSL https://tailscale.com/install.sh | sh']
|
|
- ['tailscale', 'up', '--authkey=${tailscale_authkey}']
|
|
|