{"id":4020,"sha1":"d5b87ededcd15ceda2d1b7abbccd66c3a03fec1c","playbook":{"id":2024,"items":{"plays":1,"tasks":3,"results":3,"hosts":1,"files":1,"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":"safe-oce*","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/ls-bad-bot-blocker/find-ls-bad-bot-blocker-installs.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"},{"id":131,"name":"subset:safe-oce*"}],"started":"2024-10-08T15:56:42.952977+01:00","ended":"2024-10-08T15:56:44.685791+01:00","duration":"00:00:01.732814","name":null,"ansible_version":"2.16.11","client_version":"1.7.2","python_version":"3.10.10","server_version":"1.7.2","status":"completed","path":"/home/ssh-gateway/ansible/projects/ls-bad-bot-blocker/find-ls-bad-bot-blocker-installs.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Playbook to find ls-bad-bot-blocker installs\n  hosts: all\n  gather_facts: false\n  tasks:\n    - name: On plesk server check if ls-bad-bot-blocker extension is installed\n      ansible.builtin.shell: |\n        set -o pipefail\n        plesk bin extension -l | grep ls-bad-bot-blocker \n      args:\n        executable: /bin/bash\n      register: result\n      failed_when: result.rc != 0 and \"command not found\" not in result.stderr\n      changed_when: false\n      ignore_errors: true\n\n    - name: Print message when ls-bad-bot-blocker is  installed\n      when: result.rc == 0 or \"command not found\" in result.stdout\n      ansible.builtin.debug:\n        msg: \"{{inventory_hostname}} ls-bad-bot-blocker installed\"\n\n    - name: Print error message when Plesk is not found\n      when: result.rc == 127 or \"command not found\" in result.stderr\n      ansible.builtin.debug:\n        msg: \"Error: plesk command not found, skipping the rest of the steps...\"\n","created":"2024-10-08T15:56:42.969050+01:00","updated":"2024-10-08T15:56:42.969069+01:00","path":"/home/ssh-gateway/ansible/projects/ls-bad-bot-blocker/find-ls-bad-bot-blocker-installs.yaml"}