From edcf7ab0e47a1b545d663da35ecb2c8ce0777299 Mon Sep 17 00:00:00 2001 From: kekskurse Date: Thu, 24 Jul 2025 14:34:48 +0200 Subject: [PATCH] add gcc --- cloud-init/hetzner-cloud.yml | 32 ++++++++++++++++++++++++++++++++ debian12-basic/playbook.yml | 1 + 2 files changed, 33 insertions(+) create mode 100644 cloud-init/hetzner-cloud.yml diff --git a/cloud-init/hetzner-cloud.yml b/cloud-init/hetzner-cloud.yml new file mode 100644 index 0000000..a4f3932 --- /dev/null +++ b/cloud-init/hetzner-cloud.yml @@ -0,0 +1,32 @@ +#cloud-config +users: + - name: soeren + groups: users, admin + sudo: ALL=(ALL) NOPASSWD:ALL + shell: /bin/bash + ssh_import_id: + - gh:kekskurse + - name: cloud + groups: users, admin + sudo: ALL=(ALL) NOPASSWD:ALL + shell: /bin/bash + ssh_import_id: + - gh:kekskurse +packages: + - ufw +package_update: true +package_upgrade: true +runcmd: + - ufw allow 22522 + - ufw enable + - sed -i -e '/^\(#\|\)PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config + - sed -i -e '/^\(#\|\)PasswordAuthentication/s/^.*$/PasswordAuthentication no/' /etc/ssh/sshd_config + - sed -i -e '/^\(#\|\)KbdInteractiveAuthentication/s/^.*$/KbdInteractiveAuthentication no/' /etc/ssh/sshd_config + - sed -i -e '/^\(#\|\)ChallengeResponseAuthentication/s/^.*$/ChallengeResponseAuthentication no/' /etc/ssh/sshd_config + - sed -i -e '/^\(#\|\)MaxAuthTries/s/^.*$/MaxAuthTries 5/' /etc/ssh/sshd_config + - sed -i -e '/^\(#\|\)AllowTcpForwarding/s/^.*$/AllowTcpForwarding no/' /etc/ssh/sshd_config + - sed -i -e '/^\(#\|\)X11Forwarding/s/^.*$/X11Forwarding no/' /etc/ssh/sshd_config + - sed -i -e '/^\(#\|\)AllowAgentForwarding/s/^.*$/AllowAgentForwarding no/' /etc/ssh/sshd_config + - sed -i -e '/^\(#\|\)AuthorizedKeysFile/s/^.*$/AuthorizedKeysFile .ssh\/authorized_keys/' /etc/ssh/sshd_config + - sed -i 's/^#Port 22/Port 22522/' /etc/ssh/sshd_config + - reboot diff --git a/debian12-basic/playbook.yml b/debian12-basic/playbook.yml index 8a4c34c..5f9a31f 100644 --- a/debian12-basic/playbook.yml +++ b/debian12-basic/playbook.yml @@ -26,6 +26,7 @@ - ncdu - msmtp - msmtp-mta + - gcc - name: Remove "neovim" package ansible.builtin.apt: