AWS DevOps Engineer Professional DOP-C01 – Question455

What are the bare minimum requirements for a valid Ansible playbook?

A.
The hosts, connection type, fact gathering, vars and tasks.
B. The hosts declaration and tasks
C. A YAML file with a single line containing `—'.
D. At least one play with at least a hosts declaration

Correct Answer: D

Explanation:

Explanation: Ansible Playbooks are a series of plays and must contain at a minimum, one play. A play generally consists of hosts to run on, a list of tasks, variables and roles, and any additional instructions, such as connection type, fact gathering, remote username, etc. that the tasks will need to complete. The only requirement for a valid play is to declare the hosts.
Reference:
http://docs.ansible.com/ansible/playbooks_intro.html