Execution
Date 02 Feb 2026 16:25:00 +0000
Duration 00:00:51.54
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.4 / 1.7.4
Python 3.10.10
Summary
1 Hosts
4 Tasks
4 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/ansible-luca/eol-checker.yaml

---
- name: RM10252 - PHP EOL Checker
  hosts: all
  gather_facts: false

  tasks:
    - name: Get Info
      plesk_info:
      register: plsk

    - name: Query domains using EOL Plesk PHP handlers
      ansible.builtin.command:
        cmd: >-
          plesk db -Ne
          select d.name
          from domains d
          join hosting h on h.dom_id=d.id
          where h.php = 'true'
          AND h.php_handler_id REGEXP '^plesk-php(81|80|7|5)';

      register: eol_domains
      when: (plsk.plesk_found and plsk.imunify_found) or (plsk.plesk_found and plsk.cloudlinux_found)
      changed_when: false
      failed_when: false

    - name: Build per-host report object
      ansible.builtin.set_fact:
        rm10252_report:
          hostname: "{{ inventory_hostname }}"
          active_domains: "{{ eol_domains.stdout_lines | default([]) }}"

    - name: Write report to JSON file
      ansible.builtin.copy:
        dest: "RM10252/eol_domains_report.json"
        mode: "0644"
        content: >-
          {{
            (groups['all']
              | map('extract', hostvars, 'rm10252_report')
              | list)
            | to_nice_json
          }}
        delegate_to: localhost
        run_once: true