evaluation did not work
This commit is contained in:
@@ -40,12 +40,21 @@
|
||||
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 && systemctl restart {{ ssh_service }}"
|
||||
state: absent
|
||||
special_time: reboot
|
||||
|
||||
- name: correct crontab for reboot | add
|
||||
become: true
|
||||
become_user: root
|
||||
cron:
|
||||
name: "generate SSH key on reboot, if missing"
|
||||
job: "KEYS=(/etc/ssh/ssh_host_*_key); (( ${#KEYS[@]} )) || ( ssh-keygen -A && systemctl restart {{ ssh_service }} )"
|
||||
state: present
|
||||
special_time: reboot
|
||||
|
||||
|
||||
Reference in New Issue
Block a user