Execution
Date 02 Feb 2026 17:24:30 +0000
Duration 00:03:07.01
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
396 Hosts
3 Tasks
1181 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/RM10272-alt-php-version.yaml

---
- name: Audit alt-php-config version compliance
  hosts: all
  gather_facts: false
  vars:
    desired_version_pattern: "1-69"
    audit_file: "/home/ssh-gateway/ansible/kuly/RM10272.txt"
  tasks:
    - name: Get server info
      plesk_info:
      register: plsk

    - name: Audit alt-php-config
      when: >
        plsk.plesk_found and
        (plsk.imunify_found or plsk.cloudlinux_found)
      block:
        - name: Check if alt-php-config is installed
          ansible.builtin.command: rpm -q alt-php-config
          register: rpm_check
          ignore_errors: true
          changed_when: false

        - name: Record non-compliant version to audit file
          ansible.builtin.lineinfile:
            path: "{{ audit_file }}"
            line: "{{ inventory_hostname }} - {{ rpm_check.stdout }}"
            create: true
            state: present
            mode: '0644'
          delegate_to: localhost
          when: >
            rpm_check.rc == 0 and
            not ('1-69' in rpm_check.stdout)