# replacing second word/string in file using replace module

**URL:** <https://forum.ansible.com/t/replacing-second-word-string-in-file-using-replace-module/27735>\
**Category:** Ansible Project\
**Created:** [June 7, 2018, 2:04pm UTC](https://forum.ansible.com/t/replacing-second-word-string-in-file-using-replace-module/27735 "2018-06-07T14:04:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkishore.unix](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@dkishore.unix](https://forum.ansible.com/u/dkishore.unix)\
**Post date:** [June 7, 2018, 2:04pm UTC](https://forum.ansible.com/t/replacing-second-word-string-in-file-using-replace-module/27735/1 "2018-06-07T14:04:02Z")

</div>

I am trying to replace a second occurrence string or word in particular file using replace module but its replace all the strings/words matched in file.

Ansible playbook:
