{"id":6401,"sha1":"470f21316e55c4be7d701ba5e8c33e90be5a8166","playbook":{"id":4281,"items":{"plays":1,"tasks":5,"results":778,"hosts":157,"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/zz-rm10179-check-for-php-errors.ini"],"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-11-03T09:36:29.797204Z","ended":"2025-11-03T09:43:22.860712Z","duration":"00:06:53.063508","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 has real problems (not just 'None')\n          set_fact:\n            has_real_problems: >-\n              {{\n                script_out.stdout is defined and\n                script_out.stdout | length > 0 and\n                (\n                  script_out.stdout is not search('=== PROBLEMATIC HANDLERS IN USE ===\\s*None\\s*=== PROBLEMATIC HANDLERS NOT IN USE ===\\s*None')\n                )\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-11-03T09:36:29.812555Z","updated":"2025-11-03T09:36:29.812579Z","path":"/home/ssh-gateway/ansible/kuly/RM10179-create-fpm-error-report.yaml"}