Execution
Date 22 Jul 2025 15:27:42 +0100
Duration 00:00:01.90
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.2 / 1.7.2
Python 3.10.10
Summary
1 Hosts
3 Tasks
3 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/repair_imunify.yaml

---
- name: Repair imunify
  hosts: all
  gather_facts: false

  tasks:
    - name: Get plesk info
      plesk_info:
      register: pl

    - name: Check Imunify status
      debug:
        msg: "Imunify status: {{ pl.imunify_status }}"
      when: pl.plesk_found and pl.imunify_found

    - name: Mark as changed if Imunify is not OK
      # No-op task: just sets changed=True if needed
      command: echo "Imunify needs repair"
      when: pl.plesk_found and pl.imunify_found and ("OK" not in pl.imunify_status)
      changed_when: true