0% found this document useful (0 votes)
93 views36 pages

Quiz

- Ansible is a configuration management and deployment tool that was first released in 2011 by Ansible Inc, which was later acquired by Red Hat in October 2015. - It uses Python as its engine language and is agentless, with no requirement for software to be installed on remote servers. Playbooks define automation jobs as a sequence of tasks.

Uploaded by

rasha hajlaoui
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views36 pages

Quiz

- Ansible is a configuration management and deployment tool that was first released in 2011 by Ansible Inc, which was later acquired by Red Hat in October 2015. - It uses Python as its engine language and is agentless, with no requirement for software to be installed on remote servers. Playbooks define automation jobs as a sequence of tasks.

Uploaded by

rasha hajlaoui
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Quiz 1 :

Ansible Basics

1
1. Ansible is a ?

• Continuous Integration tool


• Configuration Management tool
• Continuous Monitoring tool
• Configuration Deployment tools
2. In Which year Ansible first release
happened by Ansible Inc?

• 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 ?

• ansible servers -m ping


• ansible all -m ping -i invent.local
• ansible all -m ping -f invent.local
• ansible all -m ping
11. Which is the correct format for
running an ansible ad'hoc command?
Choose three

• ansible servers -m ping


• ansible-playbook servers -m ping
• ansible -m ping local
• ansible local -m ping -f 100
12. Playbooks are made up of plays ?

• 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

./ansible.cfg --> ~/.ansible.cfg -->


/etc/ansible/ansible.cfg -->
$ANSIBLE_CONFIG

• 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

• I add it to the "block" section


• I add it to the "rescue" section
• I add it to the "always" section
• I add the keyword ignore_errors
5. The ansible-vault command can be
used to encrypt a file?

• True
• False
6. Ansible vault encrypted files are
secure ?

• True
• False
7. With which command you can edit a
file that has been encrypted?

• ansible-vault edit foo.yml


• ansible-vault view foo.yml
• ansible-vauld decrypt foo.yml
• ansible-vauld edit --vauld-id
pass2@vauldpasswd foor.yml
8. A dynamic inventory file that is
executable is expected to respond to
the --list as an option ?

• 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

You might also like