Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll 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)
Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)