{"id":7763,"sha1":"fd890ace2a46099b8268c794ac051fe24313ce96","playbook":{"id":5604,"items":{"plays":1,"tasks":5,"results":1952,"hosts":394,"files":1,"records":0},"arguments":{"version":null,"verbosity":0,"private_key_file":"/home/ssh-gateway/.ssh/id_rsa","remote_user":"root","connection":"ssh","timeout":null,"ssh_common_args":null,"sftp_extra_args":null,"scp_extra_args":null,"ssh_extra_args":null,"ask_pass":false,"connection_password_file":null,"force_handlers":false,"flush_cache":false,"become":false,"become_method":"sudo","become_user":null,"become_ask_pass":false,"become_password_file":null,"tags":["all"],"skip_tags":[],"check":false,"diff":false,"inventory":["/home/ssh-gateway/ansible/kuly/bash-kvm-inventory-prod.sh"],"listhosts":false,"subset":null,"extra_vars":"Not saved by ARA as configured by 'ignored_arguments'","vault_ids":[],"ask_vault_pass":false,"vault_password_files":[],"forks":20,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["zz-detect-opcache-issues.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"}],"started":"2026-04-28T07:59:56.256928+01:00","ended":"2026-04-28T08:04:47.020197+01:00","duration":"00:04:50.763269","name":null,"ansible_version":"2.16.13","client_version":"1.7.5","python_version":"3.10.10","server_version":"1.7.5","status":"failed","path":"/home/ssh-gateway/ansible/kuly/zz-detect-opcache-issues.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Detect servers with missing alt-php opcache modules\n  hosts: all\n  gather_facts: false\n  vars:\n    php_versions:\n      - \"54\"\n      - \"55\"\n      - \"56\"\n    affected_versions: []\n\n  tasks:\n    - name: Get server info\n      plesk_info:\n      register: plsk\n      ignore_errors: true\n\n    - name: Check PHP versions for opcache errors\n      when: plsk.plesk_found\n      block:\n        - name: Run php command\n          ansible.builtin.command: \"/opt/alt/php{{ item }}/usr/bin/php -m\"\n          loop: \"{{ php_versions }}\"\n          register: php_checks\n          failed_when: false\n          changed_when: false\n\n        - name: Identify affected versions on this host\n          ansible.builtin.set_fact:\n            affected_versions: \"{{ affected_versions + [item.item] }}\"\n          loop: \"{{ php_checks.results }}\"\n          when: >-\n            item.stderr is defined and\n            'cannot open shared object file' in item.stderr and\n            'opcache.so' in item.stderr\n\n        - name: Report if any version is affected\n          ansible.builtin.debug:\n            msg: |\n              \u26a0\ufe0f  HOST {{ inventory_hostname }} HAS MISSING OPCACHE:\n              \u2192 Affected PHP versions: {{ affected_versions }}\n              \u2192 Run: dnf install alt-php{{ affected_versions | join(' alt-php') }}-opcache\n          when: affected_versions | length > 0\n          changed_when: true\n\n        - name: Report clean host\n          ansible.builtin.debug:\n            msg: \"\u2713 {{ inventory_hostname }}: All checked PHP versions have opcache loaded correctly\"\n          when: affected_versions | length == 0\n","created":"2026-04-28T07:59:56.272800+01:00","updated":"2026-04-28T07:59:56.272824+01:00","path":"/home/ssh-gateway/ansible/kuly/zz-detect-opcache-issues.yaml"}