Chapter 3: Implementing an Ansible Playbook
Ansible playbooks quiz
Twelve questions covering inventories, configuration, playbook structure and running playbooks. Aim for at least nine before moving on.
- Which inventory line matches `server01.example.com` through `server20.example.com`, but not `server7.example.com`?
- Which inventory section makes the group `prod` contain the groups `web` and `db`?
- Which two groups exist in every inventory without being defined?
- Which command shows the hosts in group `us`, including those inherited from child groups, as a tree?
- You run ansible-navigator from `/home/student/project`, which contains `ansible.cfg`. `ANSIBLE_CONFIG` is unset. Which file is used?
- In `ansible.cfg`, which section holds `become`, `become_method` and `become_user`?
- Which `ansible-navigator.yml` setting must be disabled so navigator can prompt you for a password?
- Why is this task a syntax error?
- What does `ansible-navigator run -m stdout site.yml --check` do?
- The second run of a playbook shows `changed=1` on every run for the same task. What is the most likely cause?
- A playbook has two plays. Play 1 has `become: true`; play 2 has `become: false`. `ansible.cfg` has `become = true`. How does play 2 run?
- Which option gives the most detailed output, including connection plug-in debugging?