Ansible/Ansible%20MCQ%20Questions Sample Test,Sample questions

Question:
 Error handling in block module uses

1.tags

2.always

3.rescue

4.Both b and c

Posted Date:-2022-09-26 07:50:01


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

Posted Date:-2022-09-26 04:52:58


Question:
 In Which Language Ansible engine written?

1.C

2.C++

3.Java

4.Python

Posted Date:-2022-09-26 03:15:36


Question:
 In which programming language is Ansible based on?

1.Java

2.Ruby

3.Python

4.C#

Posted Date:-2022-09-26 03:43:19


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




1.Hello

2.Hello, World

3.Hello World

4.none of the above

Posted Date:-2022-09-26 07:47:28


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

Posted Date:-2022-09-26 07:36:07


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

Posted Date:-2022-09-26 03:32:17


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

1.-a

2.-v

3.-i

4.-u

Posted Date:-2022-09-26 05:06:36


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

1.handlers

2.tasks

3.defaults

4.files

Posted Date:-2022-09-26 05:16:01


Question:
 Which of tasks run on notifying?

1.handlers

2.tasks

3.vars

4.templates

Posted Date:-2022-09-26 04:59:50


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

1.rpt

2.yum

3.deb

4.apt

Posted Date:-2022-09-26 07:52:16


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

1.jenkins

2.chef

3.Both a & b

4.None of these

Posted Date:-2022-09-26 03:47:52


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

1.-d

2.-f

3.-c

4.-e

Posted Date:-2022-09-26 04:49:01


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

Posted Date:-2022-09-26 04:31:04


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

Posted Date:-2022-09-26 03:36:56


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

Posted Date:-2022-09-26 04:17:24


Question:
Ansible is based on



1.scp

2.ftp

3.telnet

4.ssh

Posted Date:-2022-09-26 04:46:09


Question:
Ansible is written in

1.C

2.C++

3.Java

4.Python

Posted Date:-2022-09-26 04:50:18


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

1.ansible

2.ansible-config

3.ansible-doc

4.ansible-playbook

Posted Date:-2022-09-26 04:19:36


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

Posted Date:-2022-09-26 04:35:09


Question:
Command to verify the current ansible version

1.ansible -version

2.ansible --version yum

3.updateinfo ansible

4.uname -r

Posted Date:-2022-09-26 03:35:13


Question:
Conditional statement in ansible is

1.elif

2.when

3.swtich

4.if

Posted Date:-2022-09-26 05:11:35


Question:
How do you use variables in ansible?

1.with {{ }}

2.with $

3.just write the name of the variable

4.with $()

Posted Date:-2022-09-26 03:45:35


Question:
How many types of modules in Ansible?

1.1

2.2

3.3

4.4

Posted Date:-2022-09-26 03:09:11


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

1.1

2.2

3.3

4.4

Posted Date:-2022-09-26 07:32:52


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

Posted Date:-2022-09-26 03:40:02


Question:
IaC stands for?

1.Integration as Code

2. Infra as Code

3. An Infrastructuresible Code

4.Infrastructure as Code

Posted Date:-2022-09-26 03:07:15


Question:
In which format ansible playbooks are written?

1.txt

2.yaml

3.xml

4.jsons

Posted Date:-2022-09-26 04:47:54


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

Posted Date:-2022-09-26 07:40:01


Question:
Linux commands can be run using module/s

1.raw

2.command

3.shell

4.All of the above

Posted Date:-2022-09-26 07:26:44


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

Posted Date:-2022-09-26 03:33:59


Question:
Tests reachability using ping from Cisco IOS network devices

1.ios_ping

2.ping

3.debug

4.ios_command

Posted Date:-2022-09-26 03:41:10


Question:
The task is a unit action of Ansible.

1.yes

2.no

3.Can be yes or no

4.Can not say

Posted Date:-2022-09-26 03:23:57


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

Posted Date:-2022-09-26 03:42:20


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

Posted Date:-2022-09-26 03:03:01


Question:
What command displays your current username?

1.chmod

2. su -l

3.who

4.whoami

Posted Date:-2022-09-26 03:38:18


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

Posted Date:-2022-09-26 04:29:14


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

1..in

2. .yml

3. .j2

4.none of the above

Posted Date:-2022-09-26 03:46:38


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

Posted Date:-2022-09-26 04:21:43


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

1.XML

2.HTML

3.JSON

4.YAML

Posted Date:-2022-09-26 03:22:28


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

Posted Date:-2022-09-26 04:33:45


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

1.Isof

2.ssh-keygen

3.netstat

4.ansible-playbook

Posted Date:-2022-09-26 04:57:20


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

1.-a

2.-s

3.-u

4.-e

Posted Date:-2022-09-26 05:02:10


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

1.-a

2.-m

3.-e

4.-t

Posted Date:-2022-09-26 04:54:19


Question:
Which option is used to select inventory file?

1.-i

2.-u

3.-a

4.-t

Posted Date:-2022-09-26 05:03:14


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

Posted Date:-2022-09-26 03:10:20


Question:
___ is used to access shell environment variables?

1.lookup

2.copy

3.file

4.synchronize

Posted Date:-2022-09-26 05:05:23


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

1. Bugzilla

2.Chef

3.Ansible

4.Git

Posted Date:-2022-09-26 03:01:14


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

Posted Date:-2022-09-26 03:08:27


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

Posted Date:-2022-09-26 02:59:48


More MCQS

  1. Ansible MCQ Questions
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website 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!