{"id":5893,"sha1":"334f184210a95dc8b30a5eccf161732cc2636407","playbook":{"id":3773,"items":{"plays":1,"tasks":1,"results":1,"hosts":1,"files":1,"records":0},"arguments":{"version":null,"verbosity":0,"private_key_file":"/home/ssh-gateway/.ssh/id_rsa","remote_user":"root","connection":"ssh","timeout":null,"ssh_common_args":null,"sftp_extra_args":null,"scp_extra_args":null,"ssh_extra_args":null,"ask_pass":false,"connection_password_file":null,"force_handlers":false,"flush_cache":false,"become":false,"become_method":"sudo","become_user":null,"become_ask_pass":false,"become_password_file":null,"tags":["all"],"skip_tags":[],"check":false,"diff":false,"inventory":["/home/ssh-gateway/ansible/kuly/bash-kvm-inventory-dev.sh"],"listhosts":false,"subset":"great-wren.man-1.solus.stage.town","extra_vars":"Not saved by ARA as configured by 'ignored_arguments'","vault_ids":[],"ask_vault_pass":false,"vault_password_files":[],"forks":20,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["zz-needs-restarting.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"},{"id":227,"name":"subset:great-wren.man-1.solus.stage.town"}],"started":"2025-09-15T16:15:26.743250+01:00","ended":"2025-09-15T16:15:27.831861+01:00","duration":"00:00:01.088611","name":null,"ansible_version":"2.16.11","client_version":"1.7.3","python_version":"3.10.10","server_version":"1.7.3","status":"failed","path":"/home/ssh-gateway/ansible/kuly/zz-needs-restarting.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Check if servers need restarting using custom module\n  hosts: all\n  gather_facts: false\n\n  tasks:\n    - name: Check if system needs restarting\n      needs_restarting_check:\n      register: restart_status\n\n    - name: Display restart status\n      ansible.builtin.debug:\n        msg: |\n          {% if restart_status.needs_restarting %}\n          \u26a0\ufe0f  Server REQUIRES a restart\n          {% else %}\n          \u2705 Server does NOT need a restart\n          {% endif %}\n\n    - name: Show detailed information when restart needed\n      ansible.builtin.debug:\n        msg: |\n          Restart Required: {{ restart_status.restart_required }}\n          Return Code: {{ restart_status.command_output.rc }}\n          Error Message: {{ restart_status.command_output.stderr | default('None') }}\n      when: restart_status.needs_restarting\n\n    - name: Handle restart requirement\n      ansible.builtin.debug:\n        msg: |\n          ACTION REQUIRED: Schedule maintenance to reboot this system\n          Kernel or critical services have been updated and require a restart\n      when: restart_status.needs_restarting\n","created":"2025-09-15T16:15:26.775331+01:00","updated":"2025-09-15T16:15:26.775370+01:00","path":"/home/ssh-gateway/ansible/kuly/zz-needs-restarting.yaml"}