{"id":7655,"sha1":"3f6187736f18126c92af3f0b30abd0c81c48e97a","playbook":{"id":5497,"items":{"plays":3,"tasks":5,"results":786,"hosts":394,"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/kuly/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":["create_botstopper_inventory.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"}],"started":"2026-04-21T07:09:24.605342+01:00","ended":"2026-04-21T07:12:10.854902+01:00","duration":"00:02:46.249560","name":null,"ansible_version":"2.16.13","client_version":"1.7.5","python_version":"3.10.10","server_version":"1.7.5","status":"failed","path":"/home/ssh-gateway/ansible/kuly/create_botstopper_inventory.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Delete file if exists and create header\n  hosts: localhost\n  gather_facts: false\n  vars:\n    inv_file: /home/ssh-gateway/ansible/kuly/inventory-botstopper-servers.ini\n  tasks:\n    - name: Delete inventory file if it exists\n      ansible.builtin.file:\n        path: \"{{ inv_file }}\"\n        state: absent\n      run_once: true\n    - name: Create file and header\n      ansible.builtin.lineinfile:\n        path: \"{{ inv_file }}\"\n        line: \"[botstoppers]\\n\"\n        create: true\n        mode: '0644'\n      run_once: true\n\n- name: Playbook to generate inventory with plesk servers only\n  hosts: all\n  gather_facts: false\n  vars:\n    inv_file: /home/ssh-gateway/ansible/kuly/inventory-botstopper-servers.ini\n  tasks:\n    - name: Get servers info\n      plesk_info:\n      register: pl\n    - name: Get the host that has botstopper\n      when: pl.botstopper_found\n      ansible.builtin.lineinfile:\n        path: \"{{ inv_file }}\"\n        line: \"{{ inventory_hostname }}\"\n        insertafter: \"[botstoppers]\"\n      delegate_to: localhost\n\n- name: Add footer\n  hosts: localhost\n  gather_facts: false\n  vars:\n    inv_file: /home/ssh-gateway/ansible/kuly/inventory-botstopper-servers.ini\n  tasks:\n    - name: Add vars\n      ansible.builtin.lineinfile:\n        path: \"{{ inv_file }}\"\n        line: |\n          [botstoppers:vars]\n          ansible_user=root\n          ansible_port=2233\n        insertafter: EOF\n      run_once: true\n      delegate_to: localhost\n","created":"2026-04-21T07:09:24.622523+01:00","updated":"2026-04-21T07:09:24.622546+01:00","path":"/home/ssh-gateway/ansible/kuly/create_botstopper_inventory.yaml"}