{"id":5489,"sha1":"f9ee7e4ef34e4fc37101a1a8508d033252fbab2b","playbook":{"id":3369,"items":{"plays":1,"tasks":3,"results":3,"hosts":1,"files":1,"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":"lucky-hill.man-1.vm.plesk-server.com","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":["repair_imunify.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"},{"id":211,"name":"subset:lucky-hill.man-1.vm.plesk-server.com"}],"started":"2025-07-22T16:19:00.386531+01:00","ended":"2025-07-22T16:19:02.668887+01:00","duration":"00:00:02.282356","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/repair_imunify.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Repair Imunify\n  hosts: all\n  gather_facts: false\n\n  tasks:\n    - name: Get Plesk info\n      plesk_info:\n      register: pl\n\n    - name: Check Imunify license and trigger repair if invalid\n      # Use debug for reporting, and set changed_when appropriately\n      debug:\n        msg: \"Imunify license is not valid (status: {{ pl.imunify_license_status }}), triggering repair...\"\n      when: pl.plesk_found and pl.imunify_found and pl.imunify_license_valid == false\n      changed_when: true\n\n    - name: Run Imunify repair command\n      command: /usr/bin/imunify360-repair --license\n      args:\n        warn: false  # Avoid warning about using command\n      when: pl.plesk_found and pl.imunify_found and pl.imunify_license_valid == false\n      register: repair_result\n      changed_when: \"'Nothing to repair' not in repair_result.stdout\"\n      # Optionally, you can fail if repair fails\n      failed_when: repair_result.rc != 0 and 'Nothing to repair' not in repair_result.stdout\n\n    - name: Confirm repair result\n      debug:\n        var: repair_result\n      when: repair_result is defined\n","created":"2025-07-22T16:19:00.406691+01:00","updated":"2025-07-22T16:19:00.406713+01:00","path":"/home/ssh-gateway/ansible/kuly/repair_imunify.yaml"}