{"id":1871,"sha1":"a036da83ff95c79a7c3c536f85a8c0ae301dfdae","playbook":{"id":1428,"items":{"plays":1,"tasks":6,"results":6,"hosts":1,"files":6,"records":0},"arguments":{"version":null,"verbosity":3,"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.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":["projects/RM9718/RM9718-cron-install.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"},{"id":80,"name":"subset:versatile-chipmunk.man-1.vm.plesk-server.com"}],"started":"2024-08-30T08:04:37.195250+01:00","ended":"2024-08-30T08:04:40.574425+01:00","duration":"00:00:03.379175","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/projects/RM9718/RM9718-cron-install.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Playbook to install the crons\n  hosts: all\n  gather_facts: false\n  roles:\n    - plesk\n  tasks:\n    - name: On plesk server do this\n      when: \"'Plesk' in plsk_out.stdout\"\n      ansible.builtin.shell: |\n        set -o pipefail\n        imunify360-agent version\n      args:\n        executable: /bin/bash\n      changed_when: false\n      register: imun_out\n    - name: Print it\n      ansible.builtin.debug:\n        var: imun_out\n    - name: If imunify is installed\n      when: \"imun_out.stdout is match('^\\\\d+\\\\.\\\\d+\\\\.\\\\d+')\"\n      block:\n        - name: Upload the script\n          ansible.builtin.slurp:\n            src: /home/ssh-gateway/ansible/projects/RM9718/setup_random_cron.sh\n          delegate_to: 127.0.0.1\n          register: file_contents\n\n        - name: Execute the script\n          ansible.builtin.shell: |\n            set -o pipefail\n            echo -e \"{{ file_contents.content }}\" | base64 -d > /tmp/setup_random_cron.sh\n            chmod 755 /tmp/setup_random_cron.sh\n            /tmp/setup_random_cron.sh\n          args:\n            executable: /bin/bash\n          register: updates_out\n          changed_when: false\n      rescue:\n        - name: Print some message\n          ansible.builtin.debug:\n            var: updates_out\n","created":"2024-08-30T08:04:37.216251+01:00","updated":"2024-08-30T08:04:37.216271+01:00","path":"/home/ssh-gateway/ansible/projects/RM9718/RM9718-cron-install.yaml"}