@player001 Getting this error while running the playbook. Plz let me know what i am doing wrong while writing replace module.
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,
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.
Hi Tej, Pratiksha,
let me know what’s wrong with my script?