more work, get rid of jail stuff, using vps directly

This commit is contained in:
2024-11-16 11:16:54 +01:00
parent 9c2c43730a
commit 5a0e645bed
9 changed files with 64 additions and 7 deletions

View File

@@ -33,7 +33,7 @@
register: jailip
- name: create jail
shell: "bastille create -V {{ role_name }} {{ release }} {{ jailip.stdout }}/64 vtnet0"
shell: "bastille create -B {{ role_name }} {{ release }} {{ jailip.stdout }}/64 bridge0"
args:
creates: /usr/local/bastille/jails/{{ role_name }}

View File

@@ -1,4 +1,9 @@
---
- name: Remove volume
hetzner.hcloud.volume:
name: home
state: absent
- name: Remove server
hcloud_server:
name: "{{ hostname }}"
@@ -9,4 +14,3 @@
state: absent
ssh_keys: "{{ ssh_keys }}"
register: server

View File

@@ -0,0 +1,14 @@
LogLevel INFO
LoginGraceTime 1m
PermitRootLogin no
StrictModes yes
MaxAuthTries 3
MaxSessions 2
PubkeyAuthentication yes
PasswordAuthentication no
KbdInteractiveAuthentication no
AllowAgentForwarding no
AllowTcpForwarding no
GatewayPorts no
X11Forwarding no

View File

@@ -0,0 +1,7 @@
---
- name: start sshd
service:
name: sshd
state: restarted
async: 45
poll: 5

11
roles/ssh/tasks/main.yaml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: copy config file
copy:
src: sshd_config
dest: "/etc/ssh/"
- name: restart sshd
community.general.sysrc:
name: sshd_enable
value: "YES"
notify: restart sshd