{"id":7187,"sha1":"488d66f281220b385143e78f90bb2306de8a4f84","playbook":{"id":5030,"items":{"plays":1,"tasks":6,"results":6,"hosts":2,"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":"elegant-lemur.man-1.vm.plesk-server.com","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":["RM10272-alt-php-version.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"},{"id":274,"name":"subset:elegant-lemur.man-1.vm.plesk-server.com"}],"started":"2026-02-02T13:58:58.947810Z","ended":"2026-02-02T13:59:10.453165Z","duration":"00:00:11.505355","name":null,"ansible_version":"2.16.11","client_version":"1.7.4","python_version":"3.10.10","server_version":"1.7.4","status":"completed","path":"/home/ssh-gateway/ansible/kuly/RM10272-alt-php-version.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Audit alt-php-config version\n  hosts: all\n  gather_facts: false\n  vars:\n    desired_version_pattern: \"1-69\"\n    audit_file: \"/home/ssh-gateway/ansible/kuly/RM10272.txt\"\n  tasks:\n    - name: Get server info\n      plesk_info:\n      register: plsk\n\n    - name: Check alt-php-config version on Imunify/CloudLinux servers\n      when: >\n        plsk.plesk_found and\n        (plsk.imunify_found or plsk.cloudlinux_found)\n      block:\n        - name: Gather RPM package facts\n          ansible.builtin.package_facts:\n            manager: auto\n          changed_when: false\n\n        - name: Skip if alt-php-config is not installed\n          ansible.builtin.debug:\n            msg: \"alt-php-config not installed \u2013 skipping audit\"\n          when: \"'alt-php-config' not in ansible_facts.packages\"\n          failed_when: false\n\n        - name: Extract alt-php-config package metadata\n          ansible.builtin.set_fact:\n            alt_php_pkg: \"{{ ansible_facts.packages['alt-php-config'][0] }}\"\n          when: \"'alt-php-config' in ansible_facts.packages\"\n\n        - name: Check if version matches 1-69 pattern (e.g., 1-69.el8, 1-69.el9)\n          ansible.builtin.set_fact:\n            version_compliant: \"{{ alt_php_pkg.version == '1' and alt_php_pkg.release is regex('^69\\\\.') }}\"\n          when: \"'alt-php-config' in ansible_facts.packages\"\n\n        - name: Record non-compliant version to audit file\n          ansible.builtin.lineinfile:\n            path: \"{{ audit_file }}\"\n            line: \"{{ inventory_hostname }} | alt-php-config-{{ alt_php_pkg.version }}-{{ alt_php_pkg.release }}\"\n            create: true\n            mode: '0644'\n          delegate_to: localhost\n          when:\n            - \"'alt-php-config' in ansible_facts.packages\"\n            - not version_compliant | bool\n","created":"2026-02-02T13:58:58.967378Z","updated":"2026-02-02T13:58:58.967398Z","path":"/home/ssh-gateway/ansible/kuly/RM10272-alt-php-version.yaml"}