2022-06-23 13:26:07 +00:00
|
|
|
---
|
2022-06-27 19:28:01 +00:00
|
|
|
- name: Reboots linux host and checks status
|
2023-06-19 21:27:31 +00:00
|
|
|
hosts: kubernetes_dev
|
2022-06-23 13:26:07 +00:00
|
|
|
become: yes
|
2022-06-28 21:47:18 +00:00
|
|
|
vars_files:
|
|
|
|
|
- global_vars/main.yml
|
2022-06-27 19:28:01 +00:00
|
|
|
|
2022-06-23 13:26:07 +00:00
|
|
|
tasks:
|
2022-06-27 19:28:01 +00:00
|
|
|
|
|
|
|
|
- name: Rebooting...
|
2022-06-28 21:47:18 +00:00
|
|
|
ansible.builtin.reboot:
|
|
|
|
|
reboot_timeout: 180
|
2022-06-27 19:28:01 +00:00
|
|
|
msg: Reboot issued by Ansible
|
|
|
|
|
test_command: whoami
|
|
|
|
|
|
|
|
|
|
- name: Send Webex Teams message via BOT to confirm playbook completion
|
|
|
|
|
community.general.cisco_webex:
|
|
|
|
|
recipient_type: toPersonEmail
|
|
|
|
|
recipient_id: "{{ webex_id }}"
|
|
|
|
|
msg_type: markdown
|
|
|
|
|
personal_token: "{{ webex_token }}"
|
2023-03-15 12:13:51 +00:00
|
|
|
msg: "**Host {{ inventory_hostname }} has successfully rebooted.**"
|