Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Ansible Interview Questions and Answer – Part 8

You can merge multiple inventory files to scale out.

  • True
  • False (Ans)

A __ module may be pulled from repository at a future time.

  • Bronze
  • Core
  • Deprecated (Ans)
  • Extra

The location with the highest precedence value (most preferred) for configuration options is:

  • Environment Variable (Ans)
  • It’s the first loaded configuration file.
  • ansible.cfg in current directory
  • .ansible.cfg in user home directory

What variable type describes the remote host’s system data?

  • Fact Data Variable (Ans)
  • Dynamic Variable
  • Host Variable
  • Python Data Variable

Which of the following transport protocols allows communications for Ansible?

  • RDP
  • SSH (Ans)
  • Telnet
  • RSH

If a host fails a task, it will continue executing the plays.

  • False (Ans)
  • True

Which component defines the hosts for Ansible to communicate to?

  • Configuration
  • Inventory (Ans)
  • Playbook
  • Modules

Which binary executable installs Ansible Galaxy roles?

  • ansible-galaxy (Ans)
  • ansible
  • ansible-playbook
  • ansible-role

If Group1 had: host1, host2, and host3 AND Group2 had: host2, host3, and host6, then the following target pattern would target which hosts?

  • host1 and host6
  • host2 and host3 (Ans)
  • Only Group2 hosts
  • All hosts in Group1 and Group2

Which of the following functions does Ansible provide?

  • Storage management
  • Change management (Ans)
  • Authentication
  • Certification

A play maps __ to a set of tasks.

  • hosts (Ans)
  • a playbook
  • YAML
  • variables

When building roles, which of the following is how Ansible learns of your files?

  • Ansible Configuration
  • Playbooks
  • YAML file that defines all the locations
  • Defined directory structure (Ans)

Handlers will execute tasks, but only __.

  • if the task fails
  • when it’s been notified more than once
  • if the host allows it
  • if the task notifies it (Ans)

What’s the name of the clause to use when choosing whether to run a task?

  • When (Ans)
  • If
  • Where
  • While

Which execution type is the default?

  • Process
  • Cloud
  • Local
  • Remote (Ans)

Which file is meant to be a playbook for your entire infrastructure?

  • ansible.cfg
  • site.yaml (Ans)
  • main.yaml
  • root.yaml

The command “ansible-doc” requires an internet connection to lookup module references.

  • True
  • Only if there is a valid internet connection
  • False (Ans)

You can define variables in separate files outside of the inventory file.

  • Only when you use the INCLUDE statement
  • True (Ans)
  • False

What is the minimum Python version for Ansible Control Server?

  • Python 3.0
  • Python 2.4
  • Python 2.5
  • Python 2.6 (Ans)

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.