Execution
Date 13 Feb 2025 15:32:03 +0000
Duration 00:00:02.04
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/RM9923.yaml

---
- name: Check Plesk Extension and Imunify Installation
  hosts: all
  gather_facts: false
  tasks:
    - name: Gather Plesk Info
      plesk_info:
      register: plsk

    - name: Check if WP Toolkit is installed and Imunify is present
      ansible.builtin.debug:
        msg: "WP Toolkit and Imunify are both installed."
      when:
        - plsk.plesk_extensions_found
        - plsk.imunify_found
        - "'wp-toolkit' in [item.id for item in plsk.plsk.plesk_extensions]"
    - name: Debug when conditions are not met
      ansible.builtin.debug:
        msg: "Either WP Toolkit or Imunify is not installed."
      when:
        - not (plsk.plesk_extensions_found and plsk.imunify_found and
               "'wp-toolkit' in [item.id for item in plsk.plesk_extensions]")