Ansible

Ansible Interview Questions 7

Q101) What are ad-hoc commands ?

Answer: Ad-hoc commands in ansible is another way of executing commands on remote machines. They are your one time commands that will not be saved for future use. The other way that you can execute commands on remote machines is by writing a playbook.

Q102) What is an inventory file ?

Answer: Inventory file is the file that will be used by the playbooks to identify the IP addresses of the remote machines to execute the playbooks. This file is also known as the host file and will be

þÿ a v a i l a b l e i n / e t c / a n s i b l e / h o s t s l o c a t i o n . W h e n e v e r y o u w a n t y o e x e c u t e to provide the IP addresses in the inventory file.

READ ALSO
How to check scheduler jobs in Oracle

Q103) What is ansible tower ?

Answer: Ansible tower is the UI version of Ansible. Ansible tower provides an web user interface that you can use to execute the playbooks. Ansible tower makes it easier to use ansible for all the

IT needs.

Q104) What are roles in ansible ?

Answer: Roles are the advanced way to execute your playbooks on remote machines. Instead of writing one large playbook and making it very complicated, you can divide the playbook as per their section (Target, variables, tasks, handlers) by using roles and make the executing easier. By using roles, it becomes easier to manage very large playbooks. Roles will be present in

READ ALSO
How to check database backups via sqlplus

þÿ / e t c / a n s i b l e l o c a t i o n . Y o u c a n u s e a n s i b l e g a l a x y t o o l t o c r e a t e r o l e s

Q105) What is your understanding about Ansible ?

Answer: Ansible is a widely used IT configuration management tool . The best part of ansible is it is Open source so License is required and second one is it is Agent less , means we not need to Install any software on client machine to manage it .

Q106) What is Ansible Host and Node ?

Answer: Ansible has two part one is called Node machine and one is called Host Machine. The Node machine is here the ansible Server is installed and Host Machine is which is managed my Ansible Node.

Q107) How Ansible Communicate with its host Machine?

READ ALSO
Ansible Interview Questions 6

Answer: Ansible communicates with all its host machine using SSK key. We need to create an SSH Key using ssh-keygen command on Ansible Node machine and copy to all host machines.

Q108) What is Ansible Tower?

Answer: Ansible tower is commercial products from Redhat . It is used to simplify the job of ansible automation. We can also has lot of options like monitoring

Q109) What is Configuration Management (CM) Practices?

Answer: Configuration Management is the practice of managi8ng the complete Infrastructure as a

code ( IAC), it helps to automate the provisioning, deprovision, update, manage, deprovisioning of infrastructure which include OS, Application, update as an code.The organization is using Ansible , Terraform likes tool for their CM.

READ ALSO
Ansible Interview Questions 4

Q110) What are the basic terminologies used in Ansible.

Answer: The most basic terminology used in Ansible are

Controller Machine: It is the main controller machine, which manages all the host

Playbook: An YAML script, which contains the tasks

Task: Task is the single piece of work like install http

Inventory: The server can be gopura together know as inventory

Module: It is an executable set of tasks.

Role: An Ansible role is a pre-configured way forgetting organize the playbooks

Q111) Please define what is Ansible Galaxy?

Answer: Ansible Galaxy is the website , where we can share all the ansible roles

READ ALSO
Ansible Interview Questions and Answers 1

Q112) How can you install Ansible on Amazon EC2 instance?

Answer: Ansible can be installed on Amazon EC2 Instance using the Yum Install command.

Q113) How can you install Ansible on Amazon EC2 instance?

Answer: Ansible can be installed on Amazon EC2 Instance using sudo pip Install ansible

command.

Q114) How can you take backup of configuration in Ansible?

Answer: Use copy module in Ansible we can backup the file to remote locations