Olete.in
Articles
Mock Tests
🧪 Ansible MCQ Quiz Hub
Ansible MCQ Questions
Choose a topic to test your knowledge and improve your Ansible skills
1. ___________ is something that is used for streamlining the development and deployment process.
Continuous Delivery
Continuous Integration
Continuous Test
Continuous Intervention
2. _________ is a combination of multiple pieces working together to become an automation tool.
Bugzilla
Chef
Ansible
Git
3. What are the features of Ansible?
Unlike puppet or chef there is no software or agent managing the nodes
Passwordless network authentication which makes it more secure and easy to set up
The core concept is to push multiple small codes to the configure and run the action on client nodes
All of the above
4. IaC stands for?
Integration as Code
Infra as Code
An Infrastructuresible Code
Infrastructure as Code
5. ___________ is a repository of Ansible roles that can be shared among users and can be directly dropped into playbooks for execution. C. D.
Modules
Functions
Galaxy
Standalone
6. How many types of modules in Ansible?
1
2
3
4
7. YAML or files are like any formatted text file with few sets of rules just like JSON or XML.
TRUE
FALSE
Can be true or false
Can not say
8. In Which Language Ansible engine written?
C
C++
Java
Python
9. What language is an Ansible playbooks are written in by default ?
XML
HTML
JSON
YAML
10. The task is a unit action of Ansible.
yes
no
Can be yes or no
Can not say
11. NCS has collaborated with Red Hat on several initiatives around Ansible automation. Which are some of those?
GovTech SG Core2
iPursuit Lab
SwissCom
GovTech SG Core2 and iPursuit Lab
12. Red Hat Ansible Automation Platform offers new features. Which are the ones?
Automation Services Catalog
Automation Hub
Automation Analytics
All of the above
13. Command to verify the current ansible version
ansible -version
ansible --version yum
updateinfo ansible
uname -r
14. Ansible Content Collections is the new way to build and consume What command shows you CPU and memory utilization for running processes?
sar
top
proc
uptime
15. What command displays your current username?
chmod
su -l
who
whoami
16. How to install ansible using RHEL?
yum -y install ansible
rpm -y ansible
yum updateinfo ansible
apt-get install ansible
17. Tests reachability using ping from Cisco IOS network devices
ios_ping
ping
debug
ios_command
18. This is a usecase for ansible Facts
When I want to change the standard output color
When you want to apply commands to specific hosts
When I want to apply a command multiple times
none of the above
19. In which programming language is Ansible based on?
Java
Ruby
Python
C#
20. How do you use variables in ansible?
with {{ }}
with $
just write the name of the variable
with $()
21. What extension do the template files in Ansible have?
.in
.yml
.j2
none of the above
22. Which ones are alternatives to Ansible?(choose all that apply)
jenkins
chef
Both a & b
None of these
23. Ansible is able to deploy and manage automation of your entire IT footprint. Which are the ones that can be managed by Ansible?
Network devices such as routers, switches and firewalls
Infrastructure Provisioning
Application Deployment
All of the above
24. Ansible program files that contains ansible plug-in documentation
ansible
ansible-config
ansible-doc
ansible-playbook
25. What is Ansible?
tool to execute Linux commands only in many servers
tool for provisioning, configuration management, and application deployment
Software to assemble computer hardware.
All of above
26. What does orchestration in Ansible mean?
Is the capability to analyze systems and make them faster
Is the Director of a choir composed by ram, CPU, microchips, etc
Is the handling of an orchestra composed by Databases, servers, monitoring systems, etc.
Both A & B
27. An ______ command is a single, manually-run Ansible task that you want to perform quickly
ansible
ad hoc
ansible.cfg
ansible-doc
28. Which of following commands will check ansible inventory and group variable
ansible-inventory --list
ansible-inventory -h
ansible-inventory -graph
ansible-inventory -v
29. Command to check the playbook for syntax errors, but it does not execute it.
ansible-playbook <playbook.yml> --syntax-check
ansible-playbook <playbook.yml> --check
ansible-playbook <playbook.yml> --list-hosts
ansible-playbook <playbook.yml> --skip-tags
30. Ansible is based on
scp
ftp
telnet
ssh
31. In which format ansible playbooks are written?
txt
yaml
xml
jsons
32. Which option is used for specifying the variable while running ansible playbook?
-d
-f
-c
-e
33. Ansible is written in
C
C++
Java
Python
34. From a playbook, I want to run only 1 task and ignore others. Which of the below can I use?
loop
tags
debug
vault
35. Which option in ad-hoc command is used to execute a module?
-a
-m
-e
-t
36. Which of the below creates new authentication key pairs?
Isof
ssh-keygen
netstat
ansible-playbook
37. Which of tasks run on notifying?
handlers
tasks
vars
templates
38. Which of the command line option is used for selecting the username for play?
-a
-s
-u
-e
39. Which option is used to select inventory file?
-i
-u
-a
-t
40. ___ is used to access shell environment variables?
lookup
copy
file
synchronize
41. To increase verbosity during execution of playbook, we can use
-a
-v
-i
-u
42. Conditional statement in ansible is
elif
when
swtich
if
43. Which directory contains default values for variables of a role?
handlers
tasks
defaults
files
44. Linux commands can be run using module/s
raw
command
shell
All of the above
45. How to continue running tasks even if a task is failed?
1
2
3
4
46. Jinja2 - Guess the output of : {{ [2,2,3,4] | unique }}
2
2,3,4
2,2,3,4
none of the above
47. Jinja2 - Guess the output of : {{ [2,3,4] | intersect( [4,5,6] ) }}
2,3,4,5,6
4
2,3,5,6
2,3,4,4,5,6
48. Jinja2 - Guess the output of : {{ ["Hello","World"] | join(" ") }}
Hello
Hello, World
Hello World
none of the above
49. Error handling in block module uses
tags
always
rescue
Both b and c
50. Which of the below module installs .rpm file on centos/rhel machines?
rpt
yum
deb
apt
Submit