# Replace indented string in file

**URL:** <https://forum.ansible.com/t/replace-indented-string-in-file/36187>\
**Category:** AWX Project\
**Tags:** awx-project, awx\
**Created:** [January 10, 2022, 2:09pm UTC](https://forum.ansible.com/t/replace-indented-string-in-file/36187 "2022-01-10T14:09:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![john.westcott.iv](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/john.westcott.iv/32/95_2.png) [@john.westcott.iv](https://forum.ansible.com/u/john.westcott.iv)\
**Post date:** [January 10, 2022, 2:09pm UTC](https://forum.ansible.com/t/replace-indented-string-in-file/36187/1 "2022-01-10T14:09:59Z")

</div>

Can you give me some more details around this?  
From what I am understanding you have a playbook executing from AWX which is trying to do a replace in a file it looks like you are trying to change the string ‘/version/‘ with ‘9.1.2.3’, is that correct?  
Does the playbook work on command line? i.e. is this an issue with AWX or with Ansible.  
Assuming its not working from command and its a usage issue with Ansible itself, can the file just be a jinja template and templated out with the ’template’ module?  
If not, can you send a sample file and task?

-John
