From 0bd9fb94bd348875f15c9d110192f1a5a6f83ed2 Mon Sep 17 00:00:00 2001 From: Ruan Bekker Date: Sat, 17 Oct 2020 20:11:46 +0200 Subject: [PATCH] Create main.yml --- roles/static-ip/handlers/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 roles/static-ip/handlers/main.yml diff --git a/roles/static-ip/handlers/main.yml b/roles/static-ip/handlers/main.yml new file mode 100644 index 0000000..5c959f7 --- /dev/null +++ b/roles/static-ip/handlers/main.yml @@ -0,0 +1,12 @@ +# https://github.com/vicchi/ansible-pi-lockdown/blob/master/roles/static-ip/handlers/main.yml +--- +- name: reboot + command: shutdown -r +0 'Ansible Reboot triggered' + async: 0 + poll: 0 + ignore_errors: true + become: true + +- name: wait for reboot to finish + local_action: wait_for host={{ ipaddress }} state=started port=22 delay=50 timeout=120 + become: false