Please note: there are 2 different changes (otherwise i could have written it - and it works) . first change is to replace a line and the another one is insert a line but on the same file.
On Tuesday, 29 September 2015 19:25:25 UTC+5:30, Santosh Jambhlikar wrote > > I am trying to make 2 different changes in one file but only last change > is getting updated ... Looks like ansible holds the file in memory (after > first change) and never dump it back to disk as it knows there is/are more > change (s) to be made as per .yml file. so when it is making change > (second) in the same file (but on disks ) and while processing it , file > in memory is getting replaced with newer version. So first change was done > but never closed/completed/dumped back to disk. > > There should be some mechanism to 'close' the file after each change but > did not see it on ansible docs. Anyone aware? > > > P.S. - The same be accomplished by using different tasks but i don't want > to use (may need 15-20 changes in a file so don't want same number of tasks) > > -- 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/fa05e2f0-f7d0-460f-8caf-3badaaa55725%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
