This commit is contained in:
2025-04-30 16:47:48 +02:00
parent 9b64aed739
commit f6922ac5a8
4 changed files with 15 additions and 1 deletions

View File

@@ -32,12 +32,20 @@
job: '[[ -f /etc/ssh/ssh_host_* ]] | ssh-keygen -A'
state: absent
- name: correct crontab for reboot | add
- name: correct crontab for reboot | remove
become: true
become_user: root
cron:
name: "generate SSH key on reboot, if missing"
job: '[[ -f /etc/ssh/ssh_host_* ]] || ssh-keygen -A'
state: absent
- name: correct crontab for reboot | add
become: true
become_user: root
cron:
name: "generate SSH key on reboot, if missing"
job: "[[ -f /etc/ssh/ssh_host_* ]] || ssh-keygen -A && systemctl restart {{ ssh_service }}"
state: present
special_time: reboot

View File

@@ -22,4 +22,6 @@ sftp_path: /usr/lib/ssh/sftp-server
sudo_group: wheel
vim_package: vim
ssh_service: sshd
update_ca: /usr/bin/update-ca-trust

View File

@@ -23,6 +23,8 @@ sudo_group: sudo
vim_package: vim
wireguard_package: wireguard
ssh_service: ssh
update_ca: /usr/sbin/update-ca-certificates
equivalents:

View File

@@ -23,4 +23,6 @@ sudo_group: sudo
vim_package: vim
wireguard_package: wireguard
ssh_service: ssh
update_ca: /usr/sbin/update-da-certificates