On Fri, Feb 15, 2019, at 7:45 AM, James Cassell wrote:
> 
> 
> On Fri, Feb 15, 2019, at 7:25 AM, 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
> > 
> 
> You'll need to move your markers from block to marker_begin and marker_end
> 

You'll also need to set marker.

> 
> V/r,
> James Cassell
> 
> 
> > 
> >  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/1550235317.1010465.1658579440.59862280%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to