diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-08-09 19:30:34 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-08-09 19:30:34 +0300 |
commit | a39658d7abe0504e1c49baddff39bcc25ec74d80 (patch) | |
tree | 5aa568831aee64165e8e9820ca1d0aba58ce549e /roles/common | |
parent | remove redundant "ignore_errors" (diff) | |
download | maintenance-a39658d7abe0504e1c49baddff39bcc25ec74d80.tar.gz maintenance-a39658d7abe0504e1c49baddff39bcc25ec74d80.zip |
common: fix reboot module on Rasp. Pi 1
Diffstat (limited to '')
-rw-r--r-- | roles/common/handlers/main.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml index e7fa3e9..70c4b16 100644 --- a/roles/common/handlers/main.yml +++ b/roles/common/handlers/main.yml @@ -1,5 +1,14 @@ - name: Reboot reboot: + args: + # On my trusty old Raspberry Pi 1 Model B+, /proc/sys/kernel/random/boot_id + # can sometimes stay the same between reboots. Apparently, not enough + # entropy or something. + boot_time_command: uptime -s + # Another option is `who -s`. This option requires Ansible 2.10 or later. + + # 5 minutes is plenty. + reboot_timeout: 300 # Don't reboot yourself accidentally: when: 'ansible_env["SSH_CLIENT"].split()[0] not in ansible_all_ipv4_addresses' listen: reboot @@ -8,4 +17,7 @@ # One of the nodes is the VPN server connecting all the other nodes, wait # until all of them are back up: wait_for_connection: + args: + # 5 minutes is plenty. + timeout: 300 listen: reboot |