You are on page 1of 4

Design goals of Ansible include

All the options mentioned

YAML uses tabs for indentation, True or false?

False

Ansible acquired by

Red Hat

Which of the following is a valid YAML syntax?

path: F:\test

Ansible is

All the options mentioned

Which configuration management software is Agentless?

Ansible

Ansible can deploy to virtualization and cloud environments, Including

All the Options

Where is Inventory file located by default?

/etc/ansible/hosts

If you do not need any facts from the host, what command would you use?

both gatherfacts: no or gatherfacts: False

Which module can be used to copy files from remote machine to control machine?

Fetch

Which one is not a valid value of state argument of "file" module?

Folder

Which command tells ansible to run the playbook on all the hosts except host1?
ansible-playbook playbooks/PLAYBOOK_NAME.yml -limit 'all:!host1' / ansible-playbook
playbooks/PLAYBOOK_NAME.yml --limit "!host1" /

Which module copies dynamically generated file from control machine to target hosts?

template

Which module will you use to create a directory?

File

What module can be used to stop a playbook execution for some time?

pause

Ansible modules will apply changes everytime you run Playbook.

False

Identify the order of execution of handlers in the below snippet.

test-test1-handler2-handler3-handler_1

Handler run only once even if you run the playbook multiple times.

True

Which module can be used to force a handler to run in between two tasks?

meta

Modules are temporarily stored in the nodes and communicate with the control machine
through a ______ protocol over the standard output.

JSON

Which Ansible module is used to manage docker services and containers.

docker_service

You write comments in Jinja2 as:

{# #}
Which module you can use to install Apache in Ubuntu OS?

Apt

A Playbook starts with three dots …

False

What is the output statement of the following snippet?

tasks:
- name: test
shell: echo "hello"
register: a
debug: msg="the message is {{ a.stdout }}"

syntax error because of conflicting action statements

Using which module can you see the list of all the ansible variables?

Setup

Which command do you use to do a syntax check on your playbook?

ansible-playbook --syntax-check

You cannot define multiple conditions

False

Which of these will loop through items randomly?

with_random_choice

How do you use variable to apply condition?

when: score == 3

How can you reduce the number of SSH connections required?

Pipelining

what is the default forks value in configuration file?

5
ansible.cfg should be present in

/etc/ansible

Ansible can work as a push automated deployment system and as well as a pull automated
deployment system?

True

Ansible has two type of servers

Only node

In Try It Out section of this course, what was the value of "changed=?" under "Play
Recap", when you executed the same playbook for second time?

You can activate your privilege escalations using which settings?

become=True

How to define the number of parallel processes while communicating to remote hosts?

forks

You might also like