Execution
Date 26 Jan 2026 17:29:08 +0000
Duration 00:03:01.05
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
398 Hosts
3 Tasks
1187 Results
1 Plays
1 Files
0 Records

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

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

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

    - name: Check for both alt-php84 and alt-php85 handlers
      ansible.builtin.shell: |
        set -o pipefail
        handlers="$(plesk bin php_handler --list)"
        echo "$handlers" | grep -q 'alt-php84'
        echo "$handlers" | grep -q 'alt-php85'
      args:
        executable: /bin/bash
      register: php_check
      when: plsk.plesk_found | default(false)
      changed_when: false
      failed_when: php_check.rc > 1

    - name: Record servers missing alt-php84 or alt-php85
      ansible.builtin.lineinfile:
        create: true
        mode: '0644'
        path: RM10252/hostnames
        line: "{{ inventory_hostname }}"
      when:
        - plsk.plesk_found | default(false)
        - php_check.rc == 1
      delegate_to: localhost