Hello >>Below is what I need to achieve i think you forgot to give your requirements. if you can provide what exactly you need it will be easy to answer.
you can use blockinfile module if you want to insert/update/remove a block of lines in a file, for more understanding please follow this link: <goog_1966272997> http://docs.ansible.com/ansible/latest/blockinfile_module.html or if you want to add a line after any line you can use these settings: - lineinfile: path: <file path> regexp: '^your line ' insertafter: '^#your line ' line: 'your line' On Tuesday, September 19, 2017 at 5:11:55 PM UTC+5:30, phatak...@gmail.com wrote: > > Hello Guys, > > I want to add /append a line using anisble .How can this be achieved. I > have tried the lineinfile module ,but it dosen't seem to work .Is there a > better way to do that ,Below is what I need to achieve > > > Regards, > Salil > > > > -- 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/91fb2ae7-03b4-454c-9453-796cb222e2eb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.