Execution
Date 12 Dec 2025 10:35:53 +0000
Duration 00:03:14.39
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.3 / 1.7.3
Python 3.10.10
Summary
398 Hosts
3 Tasks
1187 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/RM10229-missing-plugins.yaml

---
- name: Playbook
  hosts: all
  gather_facts: false
  tasks:
    - name: Get plesk info
      plesk_info:
      register: plsk
    - name: Check for missing Agent360 plugins
      when: plsk.plesk_found
      ansible.builtin.shell: |
        set -o pipefail
        for p in provider_metrics fpm_errors apache_errors process_runtimes ram_per_user cpu_per_user ; do
          if agent360 --info | grep -q "$p"; then
            echo "$p: OK"
          else
            echo "$p: MISSING"
          fi
        done
      args:
        executable: /bin/bash
      register: outp
      changed_when: "'MISSING' in outp.stdout"
    - name: Save them to a file
      when: "'MISSING' in outp.stdout"
      ansible.builtin.lineinfile:
        path: zz-inv
        line: "{{ inventory_hostname }}"
        create: true
        mode: '0644'
      delegate_to: 127.0.0.1