diff options
author | Peter Mikus <pmikus@cisco.com> | 2018-05-19 15:15:29 +0200 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2018-05-30 09:49:59 +0000 |
commit | 3a14297dca576dd7e2c9f09d84bf0f5cf58c1938 (patch) | |
tree | 56de2207a8260d2204f6ce3bc7dbadcfb6e96417 /resources/tools/testbed-setup/ansible/roles/common/handlers | |
parent | 8bb12f5b902cf42c623172c562b4f2752489bc13 (diff) |
CSIT-1070 Update Ansible structure
Change-Id: I9adab174f0c15f4c05a93f61b17714fa6542ea5d
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/common/handlers')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml | 6 | ||||
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/common/handlers/reboot.yaml | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml new file mode 100644 index 0000000000..bdcf6832f4 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml @@ -0,0 +1,6 @@ +--- +# file: roles/common/handlers/main.yaml + +- name: Update GRUB + command: update-grub + tags: update-grub diff --git a/resources/tools/testbed-setup/ansible/roles/common/handlers/reboot.yaml b/resources/tools/testbed-setup/ansible/roles/common/handlers/reboot.yaml new file mode 100644 index 0000000000..01e1eb1b6b --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/common/handlers/reboot.yaml @@ -0,0 +1,14 @@ +--- +# file roles/common/handlers/reboot.yaml + +- name: Reboot host + command: shutdown -r now "Ansible updates triggered" + async: 0 + poll: 0 + ignore_errors: true + tags: reboot-host + +- name: Waiting for server to come back + local_action: wait_for host={{ inventory_hostname }} + state=started + tags: reboot-host |