Ansible/Ansible MCQ Questions Sample Test,Sample questions

Question:
 Error handling in block module uses

1.tags

2.always

3.rescue

4.Both b and c


Question:
 From a playbook, I want to run only 1 task and ignore others. Which of the below can I use?




1.loop

2.tags

3.debug

4.vault


Question:
 In Which Language Ansible engine written?

1.C

2.C++

3.Java

4.Python


Question:
 In which programming language is Ansible based on?

1.Java

2.Ruby

3.Python

4.C#


Question:
 Jinja2 - Guess the output of : {{ ["Hello","World"] | join(" ") }}




1.Hello

2.Hello, World

3.Hello World

4.none of the above


Question:
 Jinja2 - Guess the output of : {{ [2,2,3,4] | unique }}

1.2

2.2,3,4

3.2,2,3,4

4.none of the above


Question:
 NCS has collaborated with Red Hat on several initiatives around Ansible automation. Which are some of those?

1.GovTech SG Core2

2.iPursuit Lab

3.SwissCom

4.GovTech SG Core2 and iPursuit Lab


Question:
 To increase verbosity during execution of playbook, we can use

1.-a

2.-v

3.-i

4.-u


Question:
 Which directory contains default values for variables of a role?

1.handlers

2.tasks

3.defaults

4.files


Question:
 Which of tasks run on notifying?

1.handlers

2.tasks

3.vars

4.templates


Question:
 Which of the below module installs .rpm file on centos/rhel machines?

1.rpt

2.yum

3.deb

4.apt


Question:
 Which ones are alternatives to Ansible?(choose all that apply)

1.jenkins

2.chef

3.Both a & b

4.None of these


Question:
 Which option is used for specifying the variable while running ansible playbook?

1.-d

2.-f

3.-c

4.-e


Question:
An ______ command is a single, manually-run Ansible task that you want to perform quickly

1.ansible

2.ad hoc

3.ansible.cfg

4.ansible-doc


Question:
Ansible Content Collections is the new way to build and consume  What command shows you CPU and memory utilization for running processes?

1.sar

2.top

3.proc

4.uptime


Question:
Ansible is able to deploy and manage automation of your entire IT footprint. Which are the ones that can be managed by Ansible?

1.Network devices such as routers, switches and firewalls

2.Infrastructure Provisioning

3.Application Deployment

4.All of the above


Question:
Ansible is based on



1.scp

2.ftp

3.telnet

4.ssh


Question:
Ansible is written in

1.C

2.C++

3.Java

4.Python


Question:
Ansible program files that contains ansible plug-in documentation

1.ansible

2.ansible-config

3.ansible-doc

4.ansible-playbook


Question:
Command to check the playbook for syntax errors, but it does not execute it.

1.ansible-playbook <playbook.yml> --syntax-check

2.ansible-playbook <playbook.yml> --check

3.ansible-playbook <playbook.yml> --list-hosts

4.ansible-playbook <playbook.yml> --skip-tags


Question:
Command to verify the current ansible version

1.ansible -version

2.ansible --version yum

3.updateinfo ansible

4.uname -r


Question:
Conditional statement in ansible is

1.elif

2.when

3.swtich

4.if


Question:
How do you use variables in ansible?

1.with {{ }}

2.with $

3.just write the name of the variable

4.with $()


Question:
How many types of modules in Ansible?

1.1

2.2

3.3

4.4


Question:
How to continue running tasks even if a task is failed?

1.1

2.2

3.3

4.4


Question:
How to install ansible using RHEL?

1.yum -y install ansible

2.rpm -y ansible

3.yum updateinfo ansible

4.apt-get install ansible


Question:
IaC stands for?

1.Integration as Code

2. Infra as Code

3. An Infrastructuresible Code

4.Infrastructure as Code


Question:
In which format ansible playbooks are written?

1.txt

2.yaml

3.xml

4.jsons


Question:
Jinja2 - Guess the output of : {{ [2,3,4] | intersect( [4,5,6] ) }}

1.2,3,4,5,6

2.4

3.2,3,5,6

4.2,3,4,4,5,6


Question:
Linux commands can be run using module/s

1.raw

2.command

3.shell

4.All of the above


Question:
Red Hat Ansible Automation Platform offers new features. Which are the ones?

1.Automation Services Catalog

2.Automation Hub

3.Automation Analytics

4.All of the above


Question:
Tests reachability using ping from Cisco IOS network devices

1.ios_ping

2.ping

3.debug

4.ios_command


Question:
The task is a unit action of Ansible.

1.yes

2.no

3.Can be yes or no

4.Can not say


Question:
This is a usecase for ansible Facts

1.When I want to change the standard output color

2.When you want to apply commands to specific hosts

3.When I want to apply a command multiple times

4.none of the above


Question:
What are the features of Ansible?

1.Unlike puppet or chef there is no software or agent managing the nodes

2.Passwordless network authentication which makes it more secure and easy to set up

3. The core concept is to push multiple small codes to the configure and run the action on client nodes

4. All of the above


Question:
What command displays your current username?

1.chmod

2. su -l

3.who

4.whoami


Question:
What does orchestration in Ansible mean?

1.Is the capability to analyze systems and make them faster

2.Is the Director of a choir composed by ram, CPU, microchips, etc

3.Is the handling of an orchestra composed by Databases, servers, monitoring systems, etc.

4.Both A & B


Question:
What extension do the template files in Ansible have?

1..in

2. .yml

3. .j2

4.none of the above


Question:
What is Ansible?

1. tool to execute Linux commands only in many servers

2. tool for provisioning, configuration management, and application deployment

3.Software to assemble computer hardware.

4.All of above


Question:
What language is an Ansible playbooks are written in by default ?

1.XML

2.HTML

3.JSON

4.YAML


Question:
Which of following commands will check ansible inventory and group variable

1.ansible-inventory --list

2.ansible-inventory -h

3.ansible-inventory -graph

4.ansible-inventory -v


Question:
Which of the below creates new authentication key pairs?

1.Isof

2.ssh-keygen

3.netstat

4.ansible-playbook


Question:
Which of the command line option is used for selecting the username for play?

1.-a

2.-s

3.-u

4.-e


Question:
Which option in ad-hoc command is used to execute a module?

1.-a

2.-m

3.-e

4.-t


Question:
Which option is used to select inventory file?

1.-i

2.-u

3.-a

4.-t


Question:
YAML or files are like any formatted text file with few sets of rules just like JSON or XML.

1.TRUE

2.FALSE

3. Can be true or false

4.Can not say


Question:
___ is used to access shell environment variables?

1.lookup

2.copy

3.file

4.synchronize


Question:
_________ is a combination of multiple pieces working together to become an automation tool.

1. Bugzilla

2.Chef

3.Ansible

4.Git


Question:
___________ is a repository of Ansible roles that can be shared among users and can be directly dropped into playbooks for execution.
C. 
D. 

1.Modules

2.Functions

3.Galaxy

4.Standalone


Question:
___________ is something that is used for streamlining the development and deployment process.

1.Continuous Delivery

2.Continuous Integration

3.Continuous Test

4.Continuous Intervention


More MCQS

  1. Ansible MCQ Questions
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!