{"id":2071,"sha1":"1f1204194e0e8d5c83aba6b4db0462d3da281cdb","playbook":{"id":1468,"items":{"plays":1,"tasks":9,"results":1059,"hosts":137,"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":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":["compare_plesk_versions.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"}],"started":"2024-08-30T10:42:30.160914+01:00","ended":"2024-08-30T10:44:50.421469+01:00","duration":"00:02:20.260555","name":null,"ansible_version":"2.16.4","client_version":"1.7.1","python_version":"3.10.10","server_version":"1.7.1","status":"failed","path":"/home/ssh-gateway/ansible/compare_plesk_versions.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Playbook to compare plesk versions\n  hosts: all\n  gather_facts: true\n  roles:\n    - plesk\n  vars:\n    latest_ver: \"18.0.63.3\"\n    installed_ver: \"{{ plsk_ver.stdout }}\"\n    folder: /home/ssh-gateway/ansible/playbook_output\n    inventory_file: /home/ssh-gateway/ansible/non_plesk_servers.ini\n  tasks:\n    - name: Add non-Plesk servers to inventory file\n      when: not plesk_found\n      ansible.builtin.lineinfile:\n        path: \"{{ inventory_file }}\"\n        line: \"{{ ansible_facts.nodename }} ansible_port=2233 ansible_user=root\"\n        create: true\n      delegate_to: localhost\n\n    - name: Compare versions\n      when: plesk_found and installed_ver is version(latest_ver, '==')\n      ansible.builtin.debug:\n        msg: \"Installed version is the latest\"\n    - name: Check if update is needed\n      when: plesk_found and installed_ver is version(latest_ver, '<')\n      ansible.builtin.lineinfile:\n        path: \"{{ folder }}/versions_compare.txt\"\n        mode: '0644'\n        create: true\n        line: \"{{ ansible_facts.nodename }} needs update because version installed is: {{ installed_ver }}\"\n      delegate_to: 127.0.0.1\n","created":"2024-08-30T10:42:30.181068+01:00","updated":"2024-08-30T10:42:30.181088+01:00","path":"/home/ssh-gateway/ansible/compare_plesk_versions.yaml"}