Professional Documents
Culture Documents
Quiz
Quiz
Quiz
Ansible Basics
1
1. Ansible is a ?
• 2010
• 2011
• 2012
• 2013
3. When did the Red Hat acquired
Ansible?
• April 2015
• March 2016
• October 2015
• January 2017
4. Who is the author of Ansible?
• Micheal Dahaan
• James Shield
• Richie Joe
• Micheal Shoe
5. In Which Language Ansible engine
written?
• Ruby
• DSL
• Python
• YAML
6. The default static inventory for
ansible is located at
/etc/ansible/default ?
• True
• False
7. The correct option to use your own
static inventory with ansible ad'hoc
command is ansible local -L localfile -m
ping ?
• True
• False
8. What's the Ansible Playbook
execution order?
• Playbook->Play->Tasks->Task
• Playbook->Play->Task->Tasks
• Play->Playbook->Tasks->Task
• Playbook->Tasks->Play-Task
9. A requirement for ansible is to install
an agent on remote servers to listen to
the control node ?
• True
• False
10. Which command will use servers in
a local inventory called invent.local ?
• True
• False
13. Which of these are valid as the first
thing in a playbook? Choose 2
• tasks: name=
• ---
• --- # this is a comment
• - hosts: local
14. The following is allowed in a
playbook.
---
- tasks: yaml: name=yum
- hosts: local
• True
• False
15. What's the format of a playbook ?
• .json
• .yaml
• .py
16. This is the right priority order of the
ansible config file location
• True
• False
17. Which command displays examples
on all modules useful in a playbook ?
• ansible --help
• ansible-doc -list
• ansible-galaxy --show-modules
• ansible-doc -l
Quiz 2 :
Ansible Advanced
1. Facts are information on the remote
machines that are systematically
gathered while a playbook is
executed and cannot be disabled
• True
• False
2. When a dictionary is defined the way
to repeat one task on every item is to
use :
• loop
• with_dict
• with_items
3. When a task notifies a handler, the
instruction defined in the handler are
run just after the task is executed.
• True
• False
4. Playbooks will stop executing any
more steps on a host that has a task fail.
To run a task anyways
• True
• False
6. Ansible vault encrypted files are
secure ?
• True
• False
7. With which command you can edit a
file that has been encrypted?
• True
• False
9. If you use the -i option to select a
static hosts file and it’s marked as
executable, it’s still treated as a static
inventory ?
• True
• False
10. Which of the following are a valid use of
templates?
• yum: name=template.j2
• template: src:template.j2
dest:/home/ansible/index.html
• task: template: src=template.j2
dest=/home/ansible/index.html
• template: src=template.j2
dest=/home/ansible/index.html
11. Templates must use .json ?
• True
• False
12. A template has a maximum of 10
variables ?
• True
• False
13. To run tasks in serial mode , 2 by 2
servers , you set this parameter in the
task
fork : 2
• True
• False
14. This is the correct format for using
the role called common in a playbook?
---
- hosts: webservers
roles = common
• True
• False
15. Any copy, script, template or include
tasks (in the role) can reference files in
roles/x/{files,templates,tasks}/ without
having to path them ?
• True
• False
16. The command ansible-galaxy init
won't create the file structure you need
for roles ?
• True
• False