reboot(role): intro. reboot role, which handles local conns. gracefully
Some checks failed
/ Ansible Lint (push) Failing after 1m58s

This commit is contained in:
June 2025-07-01 03:38:46 +02:00
commit 835e6c5838
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
4 changed files with 41 additions and 0 deletions

12
roles/reboot/README.md Normal file
View file

@ -0,0 +1,12 @@
# Role `reboot`
A role for rebooting a host, which also handles local connections gracefully.
## Optional Arguments
- `reboot__local_handling`: How to handle reboot on local connections. The default mode is `none`.
Possible choices:
- `none`: Just runs `ansible.builtin.reboot`, which would fail on local connections.
- `ignore`: Just doesn't reboot on local connections.
- `file`: Doesn't reboot on local connections and instead touches the file defined by `reboot__local_handling_file`.
- `reboot__local_handling_file`: The file to touch, if `reboot__local_handling` is `file`. Defaults to `/var/run/ansible-reboot-required`.