mirror of
https://github.com/samsapti/bachelor-project.git
synced 2024-11-25 14:27:54 +00:00
Reboot host if needed
This commit is contained in:
parent
34b99a8adf
commit
feebc113e8
|
@ -10,6 +10,16 @@
|
||||||
update_cache: true
|
update_cache: true
|
||||||
upgrade: full
|
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 }}
|
- name: Create user {{ username }}
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: "{{ username }}"
|
name: "{{ username }}"
|
||||||
|
|
Loading…
Reference in a new issue