All India

Ansible QA

Ansible acquired by Red Hat

Which configuration management software is Agentless? Ansible

Design goals of Ansible include All

Ansible can deploy to virtualization and cloud environments, Including All

Ansible is All

Which of the following is a valid YAML syntax? path: F:\test

YAML uses tabs for indentation, True or false? 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 the “file” module? folder

Where is the Inventory file located by default? /etc/ansible/hosts

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

If you do not need any facts from the host, what command would you use? both gather_facts: no or gather_facts: False

Ansible modules will apply changes everytime you run Playbook. FALSE

Which module copies dynamically generated files from the control machine to target hosts? template

– name: test
## some code ##
– handler_1
– handler_2
– handler_3
– name: test1
## some code##
– handler_1

– name: handler_2

some code

– name: handler_3
– name: handler_1
Answer: test-test1-handler_2-handler_3-handler_1

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

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

Which module will you use to create a directory? file

You write comments in Jinja2 as: {# #}

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

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

– name: test
shell: echo “hello”
register: a
debug: msg=”the message is {{ a.stdout }}” error

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

Which module you can use to install Apache in Ubuntu OS? apt

A Playbook starts with three dots … FALSE

You cannot define multiple conditions FALSE

Which of these will loop through items randomly? with_random_choice

score: 3
– shell: echo “Bang on!! You won.”
when: ?? How do you use variable to apply condition? when: score == 3

ansible.cfg should be present in /etc/ansible

what is the default forks value in the configuration file? 5

How can you reduce the number of SSH connections required? pipelining

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

You can activate your privilege escalations using which settings? become=true

Nodes are managed by a controlling machine over __. SSH

To store sensitive information you can use ansible-vaulte. TRUE

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

Leave a Reply