DevOps Tools Engineer (LPIC-OT 701) — Question 29

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

Answer options

Correct answer: A, B, C

Explanation

The correct answers are A, B, and C because 'lineinfile' allows you to manage lines in a file, 'replace' can substitute specific strings in a file, and 'patch' applies a diff file to update the contents. Options D (insert) and E (modify) are not valid Ansible modules for file content modification.