quoting and escaping

This commit is contained in:
2025-05-07 17:22:02 +02:00
parent 42ee206a84
commit 887f021acc

View File

@@ -54,7 +54,8 @@
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 }}' )"
job: >-
{% raw %}KEYS=(/etc/ssh/ssh_host_*_key); (( ${#KEYS[@]} )) || ( ssh-keygen -A && systemctl restart {% endraw %}{{ ssh_service }}{% raw %} ){% endraw %}
state: present
special_time: reboot