refactor ansible scripts for contabo vps

This commit is contained in:
Jan Völkel 2025-11-30 22:34:02 +01:00
parent 6dad4a33a1
commit ff738fdd8f
6 changed files with 28 additions and 7 deletions

View file

@ -2,7 +2,7 @@
- name: Erstelle einen neuen User mit Sudo-Rechten
user:
name: "{{ user_name }}"
password: "{{ lookup('pipe', 'op read \"op://' + op_password_path + '\"') | password_hash('sha512') }}"
password: "{{ lookup('pipe', 'op read \"op://' + op_password_path + '\"') }}"
state: present
shell: /bin/bash
groups: wheel

View file

@ -2,4 +2,9 @@
- name: Install DNF tools
dnf:
name: "{{ dnf_text_editor }}"
state: present
state: present
- name: Install Git
dnf:
name: git
state: present

View file

@ -15,4 +15,14 @@
zone: public
service: ssh
permanent: yes
state: enabled
state: enabled
- name: Add Tailscale interface to trusted zone
firewalld:
zone: trusted
interface: tailscale0
permanent: yes
state: enabled
- name: Reload firewalld
command: firewall-cmd --reload