On Thursday, June 5, 2014 10:23:18 AM UTC-7,
ha...@airseed.com wrote:
When I try to use insertafter to update a local file, it doesn't insert the text after the insertafter text, rather it appends the text at the end.
For eg. - local_action: lineinfile dest="./hosts" regexp="{{ item.public_dns_name }}" insertafter="[masters]" line="{{ item.public_dns_name }}
I think that your problem is that you have both regexp and insertafter. I would get rid of the regexp and add state=present (just to make it clear that I want that file to be there).
Adam