Which Ansible modules can be used to change the contents of a file? (Choose three correct answers.)
Which Ansible modules can be used to change the contents of a file? (Choose three correct answers.)
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.
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