{"id":1476,"sha1":"7b6834a0530b01b02a636982327c89a706d32dbf","playbook":{"id":1207,"items":{"plays":1,"tasks":11,"results":11,"hosts":1,"files":6,"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/bash-kvm-inventory-prod.sh"],"listhosts":false,"subset":"*versatile-chipmunk*","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":["projects/RM9703/RM9703-update-httpd.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"},{"id":100,"name":"subset:*versatile-chipmunk*"}],"started":"2024-08-22T11:31:32.980589+01:00","ended":"2024-08-22T11:32:05.835682+01:00","duration":"00:00:32.855093","name":null,"ansible_version":"2.16.0","client_version":"1.7.1","python_version":"3.10.10","server_version":"1.7.1","status":"failed","path":"/home/ssh-gateway/ansible/projects/RM9703/RM9703-update-httpd.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n# tasks file for plesk\n\n- name: Check if Plesk binary exists\n  ansible.builtin.stat:\n    path: /sbin/plesk\n  register: plesk_binary\n\n- name: Handle case when Plesk binary does not exist\n  ansible.builtin.debug:\n    msg: \"Plesk binary not found at /sbin/plesk. Skipping.\"\n  when: not plesk_binary.stat.exists\n\n- name: Run Plesk command and capture full version text\n  ansible.builtin.shell: |\n    set -o pipefail\n    /sbin/plesk -v | grep \"Product version\" | cut -d \":\" -f2\n  args:\n    executable: /bin/bash\n  register: plsk_out\n  when: plesk_binary.stat.exists\n  changed_when: false\n\n- name: Check if 'Plesk' is in the output\n  ansible.builtin.set_fact:\n    plesk_found: \"{{ 'Plesk' in plsk_out.stdout }}\"\n  when: plesk_binary.stat.exists\n\n- name: Run Plesk command and capture numeric version only\n  ansible.builtin.shell: |\n    set -o pipefail\n    /sbin/plesk -v | grep \"Product version\" | cut -d \":\" -f2 | sed \"s/^[ \\t]*//\" | awk '{print $NF}'\n  args:\n    executable: /bin/bash\n  register: plsk_ver\n  when: plesk_binary.stat.exists and plesk_found\n  changed_when: false\n","created":"2024-08-22T11:31:33.128832+01:00","updated":"2024-08-22T11:31:33.128853+01:00","path":"/home/ssh-gateway/ansible/roles/plesk/tasks/main.yml"}