Wednesday, September 4, 2024
Create node-reboot.yml
---
- hosts:
become: yes
tasks:
- name: Check the uptime
shell: uptime
register: UPTIME_PRE_REBOOT
- debug: msg={{UPTIME_PRE_REBOOT.stdout}}
- name: Check the kernel info before the reboot
shell: uname -a
register: Kernel_PRE_REBOOT
- debug: msg={{Kernel_PRE_REBOOT.stdout}}
- name: Unconditionally reboot the machine with all defaults
reboot:
reboot_timeout: 600
- name: Check the uptime after reboot
shell: uptime
register: UPTIME_POST_REBOOT
- debug: msg={{UPTIME_POST_REBOOT.stdout}}
- name: Check the kernel info after the reboot
shell: uptrack-uname -a
register: Kernel_POST_REBOOT
- debug: msg={{Kernel_POST_REBOOT.stdout}}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment