Frequently Asking Interview Question and Answers
Here we have provided you with ansible interview questions . You can recall whatever you have learned in ansible through these questions. These questions will also help you to boost your confidence level.
Get Ansible Training in Chennai from Experts. Call us @ +91 86087 00340 for a free demo session!
1.Define Ansible ?
Answer : An ansible is a category of fictional device or technology capable of near-instantaneous or superluminal communication. It can send and receive messages to and from a corresponding device over any distance or obstacle whatsoever with no delay, even between star systems.
2.What is Ansible and why it is used?
Answer :Ansible is an open-source automation tool, or platform, used for IT tasks such as configuration management, application deployment, intraservice orchestration and provisioning.
3.What is Ansible and how it works?
Answer :Ansible works by connecting to your nodes and pushing out small programs, called “Ansible modules” to them. … Ansible then executes these modules (over SSH by default), and removes them when finished. Your library of modules can reside on any machine, and there are no servers, daemons, or databases required.
4.What is Ansible and puppet?
Answer :Puppet and Ansible. … Ansible is primarily used for task execution and orchestration. Puppet Enterprise’s combination of model-driven, state-based automation plus programmatic task execution gives you a unified solution and single source of truth for managing the entire lifecycle of your infrastructure.
5.Is Ansible free to use?
Answer :Yes. Ansible is an open source tool that can be used for Infrastructure provisioning and configuration management. The CLI based usage is free with no limits on the number of nodes being handled. Ansible Tower on the other hand comes with a free license for handling upto 10 nodes.
6.What is the purpose of Ansible?
Answer :Ansible can help you with configuration management, application deployment, task automation. It can also do IT orchestration, where you have to run tasks in sequence and create a chain of events which must happen on several different servers or devices.
7.What are Ansible roles?
Answer : Roles provide a framework for fully independent, or interdependent collections of variables, tasks, files, templates, and modules. In Ansible, the role is the primary mechanism for breaking a playbook into multiple files. This simplifies writing complex playbooks, and it makes them easier to reuse.
8.What are the components of Ansible?
Answer :Ansible componentsInventory. The “inventory” is a configuration file where you define the host information.Playbooks.Plays. Playbooks contain plays.Tasks. Tasks are actions carried out by playbooks.Roles. A role is the Ansible way of bundling automation content and making it reusable.Handlers.Templates.Variables.
9.What are Ansible playbooks?
Answer:An Ansible playbook is an organized unit of scripts that defines work for a server configuration managed by the automation tool Ansible. Ansible is a configuration management tool that automates the configuration of multiple servers by the use of Ansible playbooks.
10.What is Ansible Docker?
Answer : Ansible is the way to automate Docker in your environment. Ansible enables you to operationalize your Docker container build and deployment process in ways that you’re likely doing manually today, or not doing at all.
11.What is difference between Ansible and Ansible Tower?
Answer : Unlike several other CM apps, Ansible does not utilize a master-and-minions setup – this is the main difference between it and the other big boys in the CM arena Puppet, Chef, CFEngine and Salt. Ansible Tower is a web-based interface for managing Ansible. Ansible management came up with Ansible Tower in response.
12.What is the difference between Docker and Ansible?
Answer : There’s a big difference between Ansible and Docker. … Ansible is a configuration management tool. Other similar configuration managent tools are puppet, Chef, Salt. Docker is a container technology which user Unix “Kernel virtualization” to create application isolation.
13.Is Ansible better than chef?
Answer : The conclusion is, Ansible is easier to manage. And speaking of YAML… Configuration Language: YAML is an administrator-oriented language that’s easy to learn, while Chef employs a developer-oriented language called Ruby DSL (Domain Specific Language) that’s more difficult to get the hang of Advantage: Ansible.
14.What does Ansible mean?
Answer :An ansible is a category of fictional device or technology capable of near-instantaneous or superluminal communication. It can send and receive messages to and from a corresponding device over any distance or obstacle whatsoever with no delay, even between star systems.
15.Is Ansible better than puppet?
Answer :In very, very, short, there are some differences between Ansible and Puppet. … However, Puppet is more of a configuration management tool, whereas Ansible is more of a provisioning, configuration and deployment tool.
16.What is Ansible Awx?
Answer :The AWX Project — AWX for short — is an open source community project, sponsored by Red Hat, that enables users to better control their Ansible project use in IT environments. AWX is the upstream project from which the Red Hat Ansible Tower offering is ultimately derived.
17.What is Ansible tool used for?
Answer :Ansible is an open source IT Configuration Management, Deployment & Orchestration tool. It aims to provide large productivity gains to a wide variety of automation challenges. This tool is very simple to use yet powerful enough to automate complex multi-tier IT application environments.
18.What is Yaml in Ansible?
Answer : Ansible uses YAML syntax for expressing Ansible playbooks. … Ansible uses YAML because it is very easy for humans to understand, read and write when compared to other data formats like XML and JSON.
19.Why do you create roles in Ansible?
Answer :The most complicated part of a role is recalling the directory structure, but there is help. The built-in ansible-galaxy command has a subcommand that will create our role skeleton for us. Simply use ansible-galaxy init to create a new role in your present working directory.
20.What is Ansible dynamic inventory?
Answer :Without a dynamic inventory users are forced to maintain host mappings manually which can be tedious when you have many hosts that are constantly terminating and provisioning. Each time you execute Ansible, it generates a new inventory file based on the output of the dynamic inventory script.
21.What is Ansible inventory?
Answer :The Ansible inventory file defines the hosts and groups of hosts upon which commands, modules, and tasks in a playbook operate. The file can be in one of many formats depending on your Ansible environment and plugins. … If necessary, you can also create project-specific inventory files in alternate locations.
22.What is static inventory in Ansible?
Answer :A static host inventory in Ansible is an INI-like text file,in which section each declares one group of hosts ( host group).
23.What are modules Ansible?
Answer :Ansible ships with a number of modules (called the ‘module library’) that can be executed directly on remote hosts or through Playbooks. Users can also write their own modules. These modules can control system resources, like services, packages, or files (anything really), or handle executing system commands.
24.What are variables Ansible?
Answer :The idea that variables are relative to a given host might sound confusing, since Ansible allows you to define variables on a group of hosts. For example, if you define a variable in the vars section of a play, you are defining the variable for the set of hosts in the play.
25.What is Ansible vault?
Answer :Ansible Vault is a feature of ansible that allows you to keep sensitive data such as passwords or keys in encrypted files, rather than as plaintext in playbooks or roles. … Alternately, you may specify the location of a password file or command Ansible to always prompt for the password in your ansible.cfg file.
26.What are Ansible scripts?
Answer :An Ansible playbook is an organized unit of scripts that defines work for a server configuration managed by the automation tool Ansible. … Ansible plays are written in YAML. Every play is created by an administrator with environment-specific parameters for the target machines; there are no standard plays.
27.What are Ansible tasks?
Answer :Roles provide a framework for fully independent, or interdependent collections of variables, tasks, files, templates, and modules. In Ansible, the role is the primary mechanism for breaking a playbook into multiple files. This simplifies writing complex playbooks, and it makes them easier to reuse.
28.What is Ansible galaxy?
Answer : Ansible Galaxy refers to the Galaxy website where users can share roles, and to a command line tool for installing, creating and managing roles. Ansible Galaxy. The Website.
Hope you find these Ansible interview questions useful. Go through them carefully; they not only help in revisiting what you have learned but also will help you to face the interview with confidence.