# Ansible playbook help

**URL:** <https://forum.ansible.com/t/ansible-playbook-help/21545>\
**Category:** Ansible Project\
**Created:** [May 24, 2016, 3:33pm UTC](https://forum.ansible.com/t/ansible-playbook-help/21545 "2016-05-24T15:33:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaron.trujillo](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@aaron.trujillo](https://forum.ansible.com/u/aaron.trujillo)\
**Post date:** [May 24, 2016, 3:33pm UTC](https://forum.ansible.com/t/ansible-playbook-help/21545/1 "2016-05-24T15:33:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [May 25, 2016, 3:25pm UTC](https://forum.ansible.com/t/ansible-playbook-help/21545/2 "2016-05-25T15:25:17Z")

</div>

If this does not work with the lineinfile module, there is always sed  
(if the target is some kind of unix).

Johannes
