Hi James, Still same problem! Can you please see below entries and correct me if anything wrong in that?
--- - hosts: xerox become: yes tasks: - name: removelines blockinfile: marker_begin: "################ REQ000000931296 ###################" content: | User_Alias S3_OPS=pams3fedqaadmin S3_OPS ALL=(ALL) ALL marker_end: "####################################################" path: /tmp/test state: absent backup: yes Thanks, Deepan M On Friday, February 15, 2019 at 5:55:48 PM UTC+5:30, Deepan M wrote: > > > please someone help me to get answer for my query! > > --- > - hosts: testuser > become: yes > tasks: > - name: removelines > blockinfile: > block: | > > ################ request ################### > User_Alias S3_OPS=pams3fedqaadmin > S3_OPS ALL=(ALL) ALL > ####################################################" > path: /tmp/test > state: absent > backup: yes > > > ansible-playbook sudolineinfile.yml > SUDO password: > > PLAY [xerox] > ************************************************************************************************************************* > > TASK [Gathering Facts] > *************************************************************************************************************** > ok: [usamachine] > > TASK [removelines] > ******************************************************************************************************************* > ok: [usamachine] > > PLAY RECAP > *************************************************************************************************************************** > usamachine : ok=2 changed=0 unreachable=0 failed=0 > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a64aeb2a-38c4-49ca-b27b-f82b1f91bf50%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.