DevOps Tools Engineer (LPIC-OT 701) — Question 30
Which of the following Ansible tasks copies the file example.txt to a manage system?
Answer options
- A. "" rsync: src: example.txt dst: /tmp/example.txt
- B. "" copy: src: example.txt dest: /tmp/example.txt
- C. "" retrieve: src: example.txt dest: /tmp/example.txt
- D. - cp: source: example.txt dst: /tmp/example.txt
- E. - transfer: src: example.txt dest: /tmp/example.txt
Correct answer: B
Explanation
The correct answer is B, as the 'copy' module in Ansible is specifically designed to copy files from the control machine to the managed nodes. Options A, C, D, and E are incorrect because they either use non-existent modules or incorrect syntax for file transfer in Ansible.