reboot(role): intro. reboot role, which handles local conns. gracefully
This commit is contained in:
parent
249ff5f958
commit
1c729ade06
4 changed files with 41 additions and 0 deletions
14
roles/reboot/tasks/main.yaml
Normal file
14
roles/reboot/tasks/main.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- name: Reboot
|
||||
ansible.builtin.reboot:
|
||||
become: true
|
||||
when: ansible_connection != "local" or reboot__local_handling == "none"
|
||||
|
||||
- name: Touch a reboot required file
|
||||
ansible.builtin.file:
|
||||
path: "{{ reboot__local_handling_file }}"
|
||||
state: touch
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
become: true
|
||||
when: ansible_connection == "local" and reboot__local_handling == "file"
|
Loading…
Add table
Add a link
Reference in a new issue