{"id":5152,"sha1":"fb2ef910ab80d47651447dd78b0ecaeb5f3f35e3","playbook":{"id":3043,"items":{"plays":1,"tasks":5,"results":52,"hosts":11,"files":2,"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/canary-inventory"],"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":["agent360_check_version.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"}],"started":"2025-05-28T10:15:53.953189+01:00","ended":"2025-05-28T10:16:08.282395+01:00","duration":"00:00:14.329206","name":null,"ansible_version":"2.16.11","client_version":"1.7.2","python_version":"3.10.10","server_version":"1.7.2","status":"failed","path":"/home/ssh-gateway/ansible/kuly/agent360_check_version.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Check if there is a need to upgrade agent360\n  hosts: all\n  gather_facts: false\n  pre_tasks:\n    - name: Include task to get and set latest version\n      ansible.builtin.include_tasks: agent360_get_latest_version.yml\n  tasks:\n    - name: Get installed version and compare\n      ansible.builtin.shell: |\n        set -o pipefail\n        pip$(head -1  $(which agent360)| awk -F \"python\" '{print $2}') show agent360 | grep Version | awk '{ print $2 }'\n      args:\n        executable: /bin/bash\n      register: ver_out\n      changed_when: ver_out.rc != 0\n\n    - name: Log the ones need updating\n      when: ver_out.rc == 0 and ver_out.stdout < latest_version\n      ansible.builtin.lineinfile:\n        path: /home/ssh-gateway/ansible/kuly/agent360_need_upgrade.txt\n        create: true\n        mode: '0644'\n        line: '{{ inventory_hostname }} need upgrade - version {{ ver_out.stdout }}'\n      delegate_to: localhost\n","created":"2025-05-28T10:15:53.966842+01:00","updated":"2025-05-28T10:15:53.966864+01:00","path":"/home/ssh-gateway/ansible/kuly/agent360_check_version.yaml"}