From c182c4dc6694ee6e7f49cfa91f5d02ea306c072d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 4 Aug 2023 11:20:03 +0200 Subject: import some common roles --- roles/apt/handlers/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 roles/apt/handlers/main.yml (limited to 'roles/apt/handlers') diff --git a/roles/apt/handlers/main.yml b/roles/apt/handlers/main.yml new file mode 100644 index 0000000..625a8af --- /dev/null +++ b/roles/apt/handlers/main.yml @@ -0,0 +1,16 @@ +- name: Reboot + ansible.builtin.reboot: + args: + # 3 minutes is plenty. + reboot_timeout: 180 + # Don't reboot yourself accidentally: + when: 'ansible_env["SSH_CLIENT"].split()[0] not in ansible_all_ipv4_addresses' + become: true + listen: reboot + +- name: Wait for connectivity + ansible.builtin.wait_for_connection: + args: + # 3 minutes is plenty. + timeout: 180 + listen: reboot -- cgit v1.2.3