ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 205 - DOP-C01 discussion

Report
Export

You have a playbook that includes a task to install a package for a service, put a configuration file for that package on the system and restart the service. The playbook is then run twice in a row. What would you expect Ansible to do on the second run?

A.
Remove the old package and config file and reinstall and then restart the service.
Answers
A.
Remove the old package and config file and reinstall and then restart the service.
B.
Take no action on the target host.
Answers
B.
Take no action on the target host.
C.
Check if the package is installed, check if the file matches the source file, if not reinstall it; restart the service.
Answers
C.
Check if the package is installed, check if the file matches the source file, if not reinstall it; restart the service.
D.
Attempt to reinstall the package, copy the file and restart the service.
Answers
D.
Attempt to reinstall the package, copy the file and restart the service.
Suggested answer: C

Explanation:

Ansible follows an idempotence model and will not touch or change the system unless a change is warranted.

Reference: http://docs.ansible.com/ansible/glossary.html

asked 16/09/2024
maria rocio ucha paz
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first