701-100 Exam QuestionsBrowse all questions from this exam

701-100 Exam - Question 13


Which Ansible modules can be used to change the contents of a file? (Choose three correct answers.)

Show Answer
Correct Answer: ABC

The Ansible modules that can be used to change the contents of a file are 'lineinfile', 'replace', and 'patch'. The 'lineinfile' module can insert, update, or remove a line in a file. The 'replace' module can replace all instances of a particular string in a file. The 'patch' module can apply a patch to a file, which effectively changes its contents as well. The 'insert' and 'modify' modules are not actual Ansible modules for changing file contents.

Discussion

1 comment
Sign in to comment
Blob21Options: ABC
Jun 21, 2021

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/replace_module.html https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html https://docs.ansible.com/ansible/2.5/modules/patch_module.html