-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathcloud-init.yaml
More file actions
56 lines (51 loc) · 1.07 KB
/
cloud-init.yaml
File metadata and controls
56 lines (51 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#cloud-config
hostname: ${hostname}
fqdn: ${hostname}
manage_etc_hosts: true
users:
- name: app
shell: /bin/bash
ssh_authorized_keys:
- ${ssh_public_key}
- name: admin
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ${ssh_public_key}
package_update: true
package_upgrade: true
packages:
- ca-certificates
- curl
- wget
- gnupg
- vim
- git
- zip
- unzip
- openssl
- libssl-dev
- build-essential
- rsyslog
- htop
- rsync
- pkg-config
- locales
- ufw
write_files:
- path: /etc/environment
content: |
LANG=en_US.UTF-8
LC_ALL=C
LANGUAGE=en_US.UTF-8
LC_TYPE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
runcmd:
- loginctl enable-linger app
# Tailscale installation https://tailscale.com/kb/1293/cloud-init
- curl -fsSL https://tailscale.com/install.sh | sh
- tailscale up --ssh --advertise-tags=tag:server --auth-key=${tailscale_auth_key}
- tailscale set --auto-update
- sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
- locale-gen
- ufw enable