For the question asked at 13:20 in the video, I don't think he answered correctly. Correct answer would be: # ansible -i -m shell -a "sed -i '89s/.*/new line/' " This will change the 89th line of the file in all the hosts that are mentioned in inventory file. Correct me if I'm wrong.
You are wrong as well! 1. Interviewer mentioned about playbooks in the questions. You are running an ad hoc command. 2. Using lineinfile module in playbook is the right approach to change the lines in the file
For the question asked at 13:20 in the video, I don't think he answered correctly.
Correct answer would be:
# ansible -i -m shell -a "sed -i '89s/.*/new line/' "
This will change the 89th line of the file in all the hosts that are mentioned in inventory file.
Correct me if I'm wrong.
You are wrong as well!
1. Interviewer mentioned about playbooks in the questions. You are running an ad hoc command.
2. Using lineinfile module in playbook is the right approach to change the lines in the file
in this interview, he maintained nail soft limited but it's not there in google
What he ask and what you answer....