Ansible playbook help

21 views
Skip to first unread message

aaron.t...@total.care

unread,
May 25, 2016, 10:22:04 AM5/25/16
to Ansible Project
I am attempting to add a task within my playbook that alters a conf file.  I want to add text within a selected line.  I don't want to delete the line and then add the line back with the added text I need the line to remain as I may add to it from other playbooks from time to time.  Basically i am looking to take a line ABCDEFGH and add 123 between the D and the H to become ABCD123EFGH  and then from another playbook add 456 to look like ABCD123456EFGH, is this  possible?
Thanks

Johannes Kastl

unread,
May 25, 2016, 11:25:24 AM5/25/16
to ansible...@googlegroups.com
If this does not work with the lineinfile module, there is always sed
(if the target is some kind of unix).

Johannes

signature.asc
Reply all
Reply to author
Forward
0 new messages