On Thursday, June 5, 2014 10:23:18 AM UTC-7, [email protected] 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 -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f2d45c95-f52e-420c-b56b-3fddb9ac89b6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
