cloud-init/quizstaging.yml
2024-12-13 23:22:31 +03:00

60 lines
1.7 KiB
YAML

#cloud-config
password: $6$fXN.tAcAXPJJfMCf$UGRNH9qee4r5StFVRsYSesjL53bdL2H8g9Wkk1Pp5pko2gwJpcDtuV847Zat3eNVtBeuER96HpcnOQQ17m1fK0
chpasswd: { expire: False }
ssh_pwauth: False
package_update: true
package_upgrade: true
package_reboot_if_required: true
apt:
sources:
postgresql:
keyid: 7FCC7D46ACCC4CF8
source: deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main
write_files:
- path: /etc/ssh/sshd_config.d/00-cloud-init.conf
content: |
Port 17822
- path: /etc/wireguard/m1ns.conf
content: |
[Interface]
PrivateKey = eHuEQPEH+uGG0wUrCSH/dADUO0zdZgJORaIl1528s3A=
Address = 10.7.0.10/24
DNS = 10.7.0.2, 1.1.1.1
[Peer]
PublicKey = zS87ctLVH4EgN6g7/OQi82UXDk912BBm3YY9TauquAg=
PresharedKey = bwWjfneptBhMXASGP/5c8mkZ3gD8hyNAD9ekosnjtZU=
AllowedIPs = 10.7.0.0/0
PersistentKeepalive = 3600
Endpoint = 92.38.153.24:21820
- path: /etc/wireguard/m0ns.conf
content: |
[Interface]
PrivateKey = GN7ayBNmHU5heFbB78YXejiiJGVd6EavYS54vyywM3k=
Address = 10.8.0.16/24
DNS = 10.8.0.10,1.1.1.1
[Peer]
PublicKey = RiKHiZEGVAtdSYNC9eJeaWCExZMSoD9NP6aSEInUFjc=
PresharedKey = jZ+8YYnTxjeSs00RejpI4SeihIzeRmI3WoXA3p03KlI=
AllowedIPs = 10.8.0.0/24
PersistentKeepalive = 3600
Endpoint = 158.160.86.174:41820
packages:
- wireguard
- podman
- redis
- postgresql
- postgresql-contrib
runcmd:
- wg-quick up m0ns.conf
- wg-quick up m1ns.conf
- systemctl enable wg-quick@m0ns
- systemctl enable wg-quick@m1ns
- echo 'bind 127.0.0.1 10.7.0.10' >> /etc/redis/redis.conf
- systemctl enable redis-server
- systemctl start postgresql
- systemctl enable postgresql