mirror of
https://github.com/samsapti/bachelor-project.git
synced 2024-12-27 21:07:53 +00:00
Reboot host if needed
This commit is contained in:
parent
34b99a8adf
commit
feebc113e8
|
@ -10,6 +10,16 @@
|
|||
update_cache: true
|
||||
upgrade: full
|
||||
|
||||
- name: Check if a reboot is needed
|
||||
ansible.builtin.stat:
|
||||
path: /var/run/reboot-required
|
||||
register: needs_reboot
|
||||
|
||||
- name: Reboot host
|
||||
ansible.builtin.reboot:
|
||||
when: needs_reboot.stat.exists or
|
||||
(force_reboot is defined and force_reboot)
|
||||
|
||||
- name: Create user {{ username }}
|
||||
ansible.builtin.user:
|
||||
name: "{{ username }}"
|
||||
|
|
Loading…
Reference in a new issue