Help removing block in file please.

26 views
Skip to first unread message

ZillaYT

unread,
Sep 23, 2016, 1:13:44 PM9/23/16
to Ansible Project
I have a file with the following bock of text in it. I have text before and after the text block.

logstash:
  hash
: $fj;kdjjfajf;ajKFJ;dfj;dkfja;dfjFJ:LFJj;kj;lfkajs
 
#password is: some_pw


I'm trying to remove the block using this code:


- name: Delete existing logstash user
  blockinfile
:
    dest
: /path_to_file/foo.yml
    state
: absent
    block
: |
      logstash
:
        hash
: $fj;kdjjfajf;ajKFJ;dfj;dkfja;dfjFJ:LFJj;kj;lfkajs
       
#password is: some_pw


But the block persists. What am i missing? Thanks.

Tom Paine

unread,
Nov 15, 2016, 6:38:43 AM11/15/16
to Ansible Project
Did you ever figure this out?
Reply all
Reply to author
Forward
0 new messages