Examine the following inventory excerpt file named /home/user/ansible/inventory. [dbservers] db1.example.com Which of the following files does Ansible check for variables related to that inventory? (Choose all that apply.)
A. /home/user/ansible/dbservers
B. /home/user/ansible/host_vars/db1.example.com
C. /home/user/ansible/host_vars/db1
D. /home/user/ansible/group_vars/dbservers
Which is the default inventory file used by Ansible?
A. ${PWD}/.inventory
B. /etc/hosts
C. /etc/ansible/inventory
D. /etc/ansible/hosts
Which command will allow you to collect all facts for the specific host group 'labmachines'?
A. ansible -c setup labmachines
B. ansible-gather-facts labmachines
C. ansible labmachines -m facts
D. ansible labmachines -m setup
Which module returns Ansible facts?
A. The facts module
B. It is a side effect of the ping module
C. Facts are gathered when you run any module in ad-hoc mode
D. The setup module
Is there a syntax error in the following excerpt? If so, what is it?
vars: package: httpd tasks:
-
name: Deploy {{ package }}
yum:
name:
{{ package }}
state: present
A.
No, there are no syntax errors in the provided excerpt.
B.
Yes, the variable package is not defined correctly.
C.
Yes, the name parameter for the yum module should have a quoted value.
D.
Yes, the name keyword (below tasks) should have a quoted value.
What type of credential is used for accessing system accounts on your remote Linux hosts via SSH in Ansible Tower?
A. System
B. Machine
C. Insights
D. Ansible Tower
Which command ships with Ansible and provides module documentation on your system?
A. ansible-documentation
B. ansible-help
C. ansible-doc
D. ansible-module-doc
State whether the following statement is true or false. Ansible expects templates to use json format.
A. True
B. False
State whether the following statement is true or false.
The correct structure for use with roles has the various portions of the role under a central folder. E.g. if the role is called apache then the location of the tasks would be the following:
apache - tasks - main.yml
A. True
B. False
State whether the following statement is true or false.
A template can only use 1 variable.
A. True
B. False