wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Configuration Management using Ansible - 2

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

How can you encrypt a file using Ansible Vault?

a)

ansible-vault encrypt <filename>

b)

ansible encrypt-vault <filename>

c)

ansible-vault encrypt –file <filename>

d)

ansible-encrypt encrypt <filename>

2.

What is Ansible Galaxy?

a)

Store Ansible Playbooks

b)

It acts as a community and helps store Ansible Modules

c)

It acts as a community and helps store Ansible Roles and Collection

d)

Store sensitive data via ansible vault

3.

What is the purpose of the keyword "become" in an Ansible playbook?

a)

To switch to a different playbook

b)

To switch to a different (typically privileged) user on target nodes

c)

To switch to a different (typically privileged) user on controller

d)

To convert ansible modules into a role

4.

Which of the following parameter helps add / modify permissions for a file in Ansible "file" module?

a)

mode

b)

group

c)

owner

d)

state

e)

present

5.

I want to make sure that my nginx service is in running state on my target nodes. How can i ensure it?

a)

By using the “action” parameter with the value “start”

b)

By providing the name of the service as a parameter to the module

c)

By using the “service” parameter with the value “start”

d)

By using the “state” parameter with the value “started”

6.

What is the purpose of the Ansible module “setup”?

a)

To set up a new target system with the necessary software and configurations

b)

To gather facts about a target system, such as hardware and software information

c)

To automate the deployment of software to a target system

d)

To configure network settings on a target system

7.

Which of the following Ansible modules can be used to create a directory on target nodes?

a)

template

b)

package

c)

file

d)

directory

e)

lineinfile

8.

Which command will you use to run an Ansible playbook called apache.yaml?

a)

ansible apache.yaml

b)

ansible -p apache.yaml

c)

ansible-playbook apache.yaml

d)

ansible --playbook apache.yaml

9.

Which flag would you use with ansible-playbook cli to initialize variables for the playbook you are about to run?

a)

-e

b)

--extra-vars

c)

-v

d)

--vars

e)

--args

10.

Which of the following statements are true about Ansible inventory file?

a)

A file that contains the list of target hosts

b)

Located at "/etc/ansible/hosts" by default

c)

A file that contains the module definitions

d)

We can use multiple inventory files by using -i flag

e)

We can use multiple inventory files by using -h flag