Move rebooting into base.yml and increase connect_timeout
This commit is contained in:
parent
144db7ffe7
commit
2aad837ab4
|
@ -27,3 +27,18 @@
|
|||
- python3-pip
|
||||
- ufw
|
||||
- unattended-upgrades
|
||||
|
||||
- name: Check if a reboot is needed
|
||||
stat:
|
||||
path: /var/run/reboot-required
|
||||
register: needs_reboot
|
||||
tags:
|
||||
- reboot
|
||||
|
||||
- name: Reboot host
|
||||
reboot:
|
||||
connect_timeout: 120
|
||||
when: needs_reboot.stat.exists or
|
||||
(force_reboot is defined and force_reboot)
|
||||
tags:
|
||||
- reboot
|
||||
|
|
|
@ -12,11 +12,6 @@
|
|||
- name: Configure SSH
|
||||
import_tasks: ssh.yml
|
||||
|
||||
- name: Reboot if needed
|
||||
import_tasks: reboot.yml
|
||||
tags:
|
||||
- reboot
|
||||
|
||||
- name: Configure disks
|
||||
import_tasks: disks.yml
|
||||
tags:
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
# vim: ft=yaml.ansible
|
||||
---
|
||||
- name: Check if reboot is needed
|
||||
stat:
|
||||
path: /var/run/reboot-required
|
||||
register: needs_reboot
|
||||
|
||||
- name: Reboot host
|
||||
reboot:
|
||||
connect_timeout: 60
|
||||
when: needs_reboot.stat.exists or
|
||||
(force_reboot is defined and force_reboot)
|
Reference in a new issue