@Tej-Singh-Rana Getting this error while running the playbook. Plz let me know what i am doing wrong while writing replace module.
Hello, @pratikshag
You have defined “when” condition is wrong place. It’s not a part of replace module. It should be like
- name: replace
replace:
path: ...
....
when: <condition>
Hope it will help,
Hello, @pratikshag
I thought you will catch that error that’s why not commented in the previous post. First thing is you are running this playbook in the targeted server as a normal user so you should have to mention become: yes condition.
Second thing is, In your when condition, after double equals (==) double quotes has an issue, that’s not as per playbook standard.
Please apply both changes and try again.
@player001… Corrected all the errors and got the desired output. But instaead of replacing “xfusioncorp industries” , i replaced only “xfusioncorp” . Task failed . Thanks for the support.
Hello People
I don’t under stand why it got failed all was right I had created the playbook yet it says that playbook was not found on that specified path . Please help @Inderpreet @kodekloud-support3