Move rebooting into base.yml and increase connect_timeout

This commit is contained in:
Sam A. 2022-12-25 23:51:17 +01:00
parent 144db7ffe7
commit 2aad837ab4
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
3 changed files with 15 additions and 17 deletions

View file

@ -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

View file

@ -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:

View file

@ -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)