Execution
Date 22 Jul 2025 16:10:52 +0100
Duration 00:00:01.85
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 }} \
              License: {{ pl.imunify_license_valid }} \
              License status: {{ pl.imunify_license_status }}"
      when: pl.plesk_found and pl.imunify_found

    - name: Mark as changed if Imunify is not OK
      command: echo "Imunify needs repair"
      when: pl.plesk_found and pl.imunify_found and pl.imunify_license_valid
      changed_when: pl.plesk_found and pl.imunify_found and not pl.imunify_license_valid