Questions
- Why is an inventory important to Ansible?
a) It forms part of Ansible's configuration management database.
b) It is used to audit your servers.
c) It tells Ansible which servers to perform automation tasks on.
d) None of the above.
- When working with frequently changing infrastructures (such as public cloud deployments), Ansible users must manually update their inventory on a regular basis. Is this true or false?
a) True – this is the only way to do it.
b) False – dynamic inventories were invented for precisely this purpose.
- By default, Ansible processes hosts in an inventory in which order?
a) In alphabetical order
b) In lexicographical order
c) In random order
d) In the order in which they appear in the inventory
- By default, Ansible tasks in a simple playbook are executed in which order?
a) In the order in which they are written, but each task must be completed on all inventory hosts before the next is executed.
b) In the most optimal order.
c) In the order in which they are written but only on one inventory host at a time.
d) Something else.
- Which variable type takes the highest priority, overriding all other variable sources?
a) Inventory variables
b) Extra variables (from the command line)
c) Role defaults
d) Variables source via
vars_prompt
- What is the name of the special Ansible variables that only exist at runtime?
a) Special variables
b) Runtime variables
c) Magic variables
d) User variables
- If you wanted to access external data from a playbook, what would you use?
a) A lookup plugin
b) A lookup module
c) A lookup executable
d) A lookup role
- What is Ansible's preferred default transport mechanism for most non-Windows hosts?
a) The REST API
b) RabbitMQ
c) RSH
d) SSH
- What can inventory variables be used to do?
a) Define unique data for each host or group of hosts in an inventory.
b) Declare your playbook variables.
c) Define connection parameters for your inventory hosts.
d) Both (a) and (c).
- How can you override the default Ansible configuration on your system?
a) By creating an Ansible configuration file in any location, and using the
ANSIBLE_CFG
environment variable to specify this location.b) By creating a file called
ansible.cfg
in the current working directory.c) By creating a file in your home directory called
~/.ansible.cfg
.d) Any of the above.