{"id":6380,"sha1":"524fa527f73c30ceb7e2813ff2a8abcda389d6d1","playbook":{"id":4260,"items":{"plays":1,"tasks":6,"results":2036,"hosts":399,"files":1,"records":0},"arguments":{"version":null,"verbosity":2,"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":["RM10179-create-fpm-error-report.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"}],"started":"2025-10-30T09:50:57.279794Z","ended":"2025-10-30T09:56:57.760649Z","duration":"00:06:00.480855","name":null,"ansible_version":"2.16.11","client_version":"1.7.3","python_version":"3.10.10","server_version":"1.7.3","status":"failed","path":"/home/ssh-gateway/ansible/kuly/RM10179-create-fpm-error-report.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Check with the script for errors\n  hosts: all\n  gather_facts: false\n  tasks:\n    - name: Get server info\n      plesk_info:\n      register: plsk\n    - name: On plesk server execute block\n      when: plsk.plesk_found\n      block:\n        - name: Upload script\n          ansible.builtin.copy:\n            src: find_fpm_errors.sh\n            dest: /root/find_fpm_errors.sh\n            mode: '0755'\n          changed_when: false\n        - name: Execute the script\n          ansible.builtin.shell: |\n            set -o pipefail\n            /root/find_fpm_errors.sh \"{{ type }}\"\n          args:\n            executable: /bin/bash\n          register: script_out\n          changed_when: false\n        - name: Check if output contains real problems\n          ansible.builtin.set_fact:\n            has_real_problems: >-\n              {{\n                script_out.stdout is defined and\n                script_out.stdout | length > 0 and\n                (script_out.stdout | replace('None', '') | replace('\\n', '') | trim | length > 0) and\n                ('None' not in script_out.stdout or\n                 (script_out.stdout | regex_replace('\\\\s+', ' ') | trim != '=== PROBLEMATIC HANDLERS IN USE === None === PROBLEMATIC HANDLERS NOT IN USE === None'))\n              }}\n        - name: Create human-readable output for each host with real problems\n          when: has_real_problems | default(false)\n          ansible.builtin.copy:\n            content: |\n              PHP Handler Error Report for {{ inventory_hostname }}\n              ==========================================\n\n              {{ script_out.stdout }}\n\n              Summary:\n              - This report shows problematic PHP handlers on {{ inventory_hostname }}\n              - \"PROBLEMATIC HANDLERS IN USE\" lists handlers that have errors and are currently assigned to domains\n              - \"PROBLEMATIC HANDLERS NOT IN USE\" lists handlers that have errors but are not currently assigned to domains\n              - These handlers should be investigated and potentially replaced or fixed\n            dest: \"/home/ssh-gateway/ansible/kuly/host-reports/alt-php-errors-{{ inventory_hostname }}-{{ type }}.txt\"\n            mode: '0644'\n          delegate_to: 127.0.0.1\n          changed_when: false\n        - name: Save summary line for hosts with real problems\n          when: has_real_problems | default(false)\n          ansible.builtin.lineinfile:\n            path: \"/home/ssh-gateway/ansible/kuly/alt-php-fpm-errors-{{ type }}.txt\"\n            line: \"{{ inventory_hostname }} - has problematic PHP handlers\"\n            create: true\n            mode: '0644'\n          delegate_to: 127.0.0.1\n","created":"2025-10-30T09:50:57.308114Z","updated":"2025-10-30T09:50:57.308151Z","path":"/home/ssh-gateway/ansible/kuly/RM10179-create-fpm-error-report.yaml"}