{"id":59,"sha1":"0f013ae57e6b3899fbc6a8185e6474691a95f631","playbook":{"id":59,"items":{"plays":1,"tasks":3,"results":24,"hosts":8,"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/hosts-kvm-nodes"],"listhosts":false,"subset":"all-prod","extra_vars":"Not saved by ARA as configured by 'ignored_arguments'","vault_ids":[],"ask_vault_pass":false,"vault_password_files":[],"forks":30,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["RM9498.yaml"]},"labels":[{"id":1,"name":"remote_user:root"},{"id":2,"name":"check:False"},{"id":3,"name":"tags:all"},{"id":8,"name":"RM9498"},{"id":9,"name":"agent360"},{"id":11,"name":"subset:all-prod"}],"started":"2024-03-25T13:00:57.610303Z","ended":"2024-03-25T13:01:05.363322Z","duration":"00:00:07.753019","name":"RM9498","ansible_version":"2.16.4","client_version":"1.7.1","python_version":"3.10.10","server_version":"1.7.2.dev2","status":"completed","path":"/home/ssh-gateway/ansible/RM9498.yaml","controller":"ssh-gw-4.layershift.com","user":"root"},"content":"---\n- name: Playbook to remove the line from file if matched regexp\n  hosts: all\n  vars:\n    folder: /home/ssh-gateway/ansible/playbook_output\n    ara_playbook_name: RM9498\n    ara_playbook_labels:\n      - RM9498\n      - agent360\n  tasks:\n    - name: Check file existence\n      ansible.builtin.stat:\n        path: \"/etc/agent360-custom.ini\"\n      register: cust\n    - name: Remove line in file if exists\n      when: cust.stat.exists\n      ansible.builtin.lineinfile:\n        path: \"/etc/agent360-custom.ini\"\n        backup: true\n        state: absent\n        regexp: '^interval\\s*=\\s*100$'\n      register: line_removed\n    - name: Restart if the line was removed\n      ansible.builtin.service:\n        name: agent360\n        state: restarted\n      when: line_removed.changed\n","created":"2024-03-25T13:00:57.631115Z","updated":"2024-03-25T13:00:57.631140Z","path":"/home/ssh-gateway/ansible/RM9498.yaml"}