reboot(role): intro. reboot role, which handles local conns. gracefully
Also use this role instead of plain ansible.builtin.reboot. This is in preparation for using ansible_pull as we don't want to have ansible.builtin.reboot fail local playbook runs.
This commit is contained in:
parent
ff5f8ffc80
commit
2e9a9e0339
5 changed files with 46 additions and 2 deletions
12
roles/reboot/README.md
Normal file
12
roles/reboot/README.md
Normal 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`.
|
Loading…
Add table
Add a link
Reference in a new issue