Execution
Date
13 Mar 2026 13:29:10 +0000
Duration
00:04:27.84
Controller
ssh-gw-4.layershift.com
User
root
Versions
Ansible
2.16.13
ara
1.7.4 / 1.7.4
Python
3.10.10
Summary
398
Hosts
6
Tasks
1972
Results
1
Plays
1
Files
0
Records
File: /home/ssh-gateway/ansible/ansible-luca/eol-checker.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | --- - name: RM10252 - PHP EOL Checker hosts: all gather_facts: false strategy: linear vars: active_php_sql: >- select concat(d.name, ' ', h.php_handler_id) 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)'; disabled_php_sql: >- select concat(d.name, ' ', h.php_handler_id) from domains d join hosting h on h.dom_id = d.id where h.php = 'false' AND h.php_handler_id REGEXP '^plesk-php(81|80|7|5)'; tasks: - name: Initialize per-host report object (always) ansible.builtin.set_fact: rm10252_report: hostname: "{{ inventory_hostname }}" active_php_domains: [] disabled_php_domains: [] - name: Get Info plesk_info: register: plsk - name: Query domains using active EOL Plesk PHP handlers ansible.builtin.command: argv: - plesk - db - -Ne - "{{ active_php_sql }}" register: active_eol_php when: plsk.plesk_found and (plsk.imunify_found or plsk.cloudlinux_found) changed_when: false failed_when: false - name: Query domains using disabled EOL Plesk PHP handlers ansible.builtin.command: argv: - plesk - db - -Ne - "{{ disabled_php_sql }}" register: disabled_eol_php when: plsk.plesk_found and (plsk.imunify_found or plsk.cloudlinux_found) changed_when: false failed_when: false - name: Update per-host report object with query results ansible.builtin.set_fact: rm10252_report: hostname: "{{ inventory_hostname }}" active_php_domains: "{{ active_eol_php.stdout_lines | default([]) }}" disabled_php_domains: "{{ disabled_eol_php.stdout_lines | default([]) }}" when: active_eol_php is defined or disabled_eol_php is defined - name: Write report to JSON file ansible.builtin.copy: dest: RM10252/eol_domains_report.json mode: "0644" content: >- {{ ( (ansible_play_hosts_all | map('extract', hostvars) | map(attribute='rm10252_report', default={}) | reject('equalto', {}) | selectattr('active_php_domains', 'ne', []) | list ) + (ansible_play_hosts_all | map('extract', hostvars) | map(attribute='rm10252_report', default={}) | reject('equalto', {}) | selectattr('disabled_php_domains', 'ne', []) | list) ) | unique | to_nice_json }} delegate_to: localhost run_once: true when: >- ( ansible_play_hosts_all | map('extract', hostvars) | map(attribute='rm10252_report', default={}) | map(attribute='active_php_domains', default=[]) | map('length') | sum ) > 0 or ( ansible_play_hosts_all | map('extract', hostvars) | map(attribute='rm10252_report', default={}) | map(attribute='disabled_php_domains', default=[]) | map('length') | sum ) > 0 |