Execution
Date 28 Apr 2026 07:54:00 +0100
Duration 00:00:56.73
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.13
ara 1.7.5 / 1.7.5
Python 3.10.10
Summary
0 Hosts
1 Tasks
0 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/zz-search-zend-guard-loader.yaml

---
- name: Search for zend-guard-loader
  hosts: all
  gather_facts: false
  vars:
    php_versions:
      - "54"
      - "55"
      - "56"

  tasks:
    - name: Get server info
      plesk_info:
      register: plsk

    - name: Check each PHP version for opcache loading errors
      when: plsk.plesk_found
      block:
        - name: Run php -m and capture output
          ansible.builtin.command: "/opt/alt/php{{ item }}/usr/bin/php -m"
          loop: "{{ php_versions }}"
          register: php_checks
          failed_when: false
          changed_when: false

        - name: Install alt-phpXX-opcache if error is detected
          ansible.builtin.dnf:
            name: "alt-php{{ item.item }}-opcache"
            state: present
          loop: "{{ php_checks.results }}"
          when: >-
            item.stdout is defined and
            'cannot open shared object file' in item.stdout and
            'opcache.so' in item.stdout