{"id":3985,"sha1":"279f5eb2a5c29a27e022a3225a0008240241064e","playbook":{"id":1995,"items":{"plays":1,"tasks":7,"results":1143,"hosts":165,"files":11,"records":0},"arguments":{"version":null,"verbosity":2,"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-prod.sh"],"listhosts":false,"subset":null,"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":["check_if_cron_enabled.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"}],"started":"2024-09-25T12:45:13.658921+01:00","ended":"2024-09-25T12:47:29.353767+01:00","duration":"00:02:15.694846","name":null,"ansible_version":"2.16.11","client_version":"1.7.2","python_version":"3.10.10","server_version":"1.7.2","status":"failed","path":"/home/ssh-gateway/ansible/kuly/check_if_cron_enabled.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n# tasks file for imunify360-agent\n- name: Check if imunify360-agent binary exists\n  ansible.builtin.stat:\n    path: /usr/bin/imunify360-agent\n  register: imunify_binary\n\n- name: Handle case when imunify360-agent binary does not exist\n  ansible.builtin.set_fact:\n    imunify_found: false\n  when: not imunify_binary.stat.exists\n\n- name: Run imunify360-agent health command and capture the output\n  ansible.builtin.shell: |\n    set -o pipefail\n    /usr/bin/imunify360-agent health\n  args:\n    executable: /bin/bash\n  register: imunify_health_out\n  when: imunify_binary.stat.exists\n  changed_when: false\n\n- name: Check if 'OK' is in the imunify360-agent health output\n  ansible.builtin.set_fact:\n    imunify_found: \"{{ 'OK' in imunify_health_out.stdout }}\"\n  when: imunify_binary.stat.exists\n\n# - name: Run imunify360-agent health with --json flag and capture output\n#  ansible.builtin.shell: |\n#    set -o pipefail\n#    /usr/bin/imunify360-agent health --json\n#  args:\n#    executable: /bin/bash\n# register: imunify_health_json\n#  when: imunify_binary.stat.exists and imunify_found\n#  changed_when: false\n","created":"2024-09-25T12:45:14.044546+01:00","updated":"2024-09-25T12:45:14.044569+01:00","path":"/home/ssh-gateway/ansible/roles/imunify360/tasks/main.yml"}