Here are some common Ansible Interview Questions which you might be asked during an interview for a junior DevOps engineer.


Question 1

Correct Answers: 1/4

Which of the following commands will install Ansible on Ubuntu?


Question 2

Correct Answers: 1/4

Which command will you use to check your Ansible version?


Question 3

Correct Answers: 1/4

The default location of the ansible.cfg file is:


Question 4

Correct Answers: 1/4

The default Ansible inventory file is located at:


Question 5

Correct Answers: 1/2

With Ansible you can only use SSH key as it does not work with SSH password.


Question 6

Correct Answers: 1/4

You can also get the Ansible documentation directly via your terminal by using:


Question 7

Correct Answers: 1/4

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


Question 8

Correct Answers: 1/2

Ansible is an open-source agentless automation tool that enables you to easily configure and deploy systems.


Question 9

Correct Answers: 1/2

What are Ansible ad-hoc commands?


Question 10

Correct Answers: 1/4

Which argument do you need to specify in order to run a specific Ansible module?


Question 11

Correct Answers: 1/4

What does the Ansible setup module do?


Question 12

Correct Answers: 1/4

Which Ansible command will you use to install Apache on Ubuntu host?


Question 13

Correct Answers: 1/2

The -b flag in an Ansible ad-hoc command indicates that the command should be executed with sudo privileges.


Question 14

Correct Answers: 1/4

Which command will you use to run a playbook called install.yaml with Ansible?


Question 15

Correct Answers: 1/4

Which argument will you use to specify a variable for your Ansible playbook?


Question 16

Correct Answers: 1/2

Ansible playbooks are the basis for a really simple configuration management and multi-machine deployment system, unlike any that already exist, and one that is very well suited to deploying complex applications.


Question 17

Correct Answers: 1/4

What does 'become: yes' mean in Ansible playbooks?


Question 18

Correct Answers: 1/4

What is the Ansible setup module used for?


Question 19

Correct Answers: 1/4

Which command would you use to gather facts with Ansible?


Question 20

Correct Answers: 1/4

Which command would you use to get the hostname of a remote host with Ansible


Question 21

Correct Answers: 1/4

Which of the following values would give you the hostname of the remote host in your Ansible Playbook?


Question 22

Correct Answers: 1/4

What do you need to specify in your Ansible playbook to stop gathering facts?


Finish Quiz