Ansible interview questions For Freshers & Experienced

  • Sharad Jaiswal
  • 12th Dec, 2019
  • 595 Followers

Ansible is an open-source automation engine for automating IT infrastructures, application deployment, and many other tools. Since it was released in 2012, it doesn't have a large community to support. But it is constantly growing at a vast pace and competing with the older engines. Like others, it has many features such as easily deployment due to Agentless functionality, uses playbooks to describe Automation tools, use of YAML language which is very easy to understand and many more.

It is not possible to describe all about Ansible here. So, give time to yourself to read the full article and know more about it in a detailed manner. Along with that, you will find online interview questions on Ansible that will help you to crack any interviews.

Ansible interview questions
Updated ON

12th Dec, 2019

No. of Questions

0

Posted In

Python

Author

Sharad Jaiswal

Key Features of Ansible

Below are few major features of Ansible

Easy to Learn

‎GNU General Public License

YAML-Based configuration

Agentless

Dynamic Inventory script

REST API and web service

Multiple Platform support

Cloud integration

Secure and Highly reliable

Ansible Interview Questions

Ansible vs Puppet. Which is better?

Ansible Puppet
Ansible was introduced in 2012 by Ansible Works which is currently owned by the Red Hat. The Puppet was introduced in 2005 and founded by the Luke Kanies.
It is written in the Python programming language. It is written in the Ruby programming language.
It is meant to be lightweight with fast deployment features. Puppet is so slow in adopting requested changes like new features additions or fixing bugs etc.
Ansible’s repository name is Ansible Galaxy. Puppet’s repository name is Puppet Forge.
In Ansible, the server pushes configurations to nodes for quick deployment. The client pulls configurations from the server in case of the puppet.
Scalability is considered more convenient in Ansible. Scalability is considered less convenient in Puppet
Ansible has a smaller developer community than Puppet Puppet has more support and a bigger developer community.
Ansible is good for small and easy deployments Puppet is generally used for complex or longer deployments.

Pros of Ansible:

  • Easy to understand: The most important feature of any automation tool is its understanding. This means how easily the user can understand it and how much throughput it can provide in a short amount of time. Well, good news for all Ansible users, it provides both features with great speed and perfection. There is no dependency system in Ansible which let the tasks run sequentially and when an error encounter, it stops.  Besides, this also makes troubleshooting easier.
  • Ansible Galaxy: Unlike others, Ansible has the feature named as Galaxy. This is the central repository for searching and sharing the Ansible content. It can be also used for reusing, for example, roles for server configuration can be downloaded and reused by many users. This also accelerates the deployment time. 
  • Python-based: Contrary to other competing solutions which are written in languages such as Ruby, Ansible is written in Python. This results in an easily understandable, flexible and faster in speed as most python libraries are present by default. Coupling with this, Python is a common language for scripting and all engineers and administrators are most likely to know Python. So, they don’t face the difficulty to learn a new language for using Ansible.
  • Extensible: In conjunction with the above all, Ansible modules are popular for extending the functionality of their tools. They can be written in any language means they are not language constraint, but as long as Ansible returns data in JSON format.
  • Documentation: It has great documentation in which all the functionalities, features are explained in a very detailed manner. Any native user can learn Ansible from its documentation very easily. 
  • No need of Agents:  Ansible doesn't need agents to be installed on its system to manage the nodes. However, it handles all agent-master communications with Paramiko module or standard SSH. Being agentless, it doesn't have to maintain the agents, so less burden and better performance.
  • Playbooks are written in YAML: Ansible configuration files also known as Playbooks are written in YAML. It is better than other formats such as JSON for configuration and automation purposes. It supports comments which make its code more readable. Along with that, it also uses the anchors for referencing other things.

Cons of Ansible:

  • Popularity: It is not as much popular as Chef or Puppet because it is newer in the market. It doesn't have a large community to support the users, and also there is less information available on the web. So, the person who wants to use Ansible has to face difficulty to find the solutions to their problems. 
  • Less support of Enterprise: As it is newer in the market, therefore it doesn't have much experience working with large enterprises. 
  • Lack of UI: Ansible support Ui with AWX, a graphical user interface to manage infrastructure easily. But is it capable enough to compete with the command line interface? The answer is no. AWX finally evolved into Ansible Tower but still, its work is in progress. It can't match the functionality of Command-line Interface and only 85% work of CLI can be performed by GUI.
  • No notion of state: Since it doesn’t keep track of dependencies so performs the sequential series of tasks. It is beneficial for some users, but many like to go with the automation tool to manage the extensive catalogs for ordering. So, I think, this depends on a user to user.

About Author :

  • Author of Ansible interview questions

    Sharad Jaiswal

    Sharad Jaiswal is Sr. Web Developer from Noida area. He have rich experience in PHP, Angular Js, React, javascript and Node .If you any query or project on these programming you can drop your enquiry in comment section.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.