Here we have compiled the most probable DevOps interview questions asked in the industry. You will learn about software version control, Git repository, reverting a commit in Git, Vagrant, continuous testing elements, and the importance of continuous integration, testing, and deployment. These questions are curated after discussing with many interviewers and DevOps Training experts.
Ansible Facts are unchangeable information about the remote hosts. Ansible collects almost all the information about the target hosts as it runs a playbook. The task of collecting this remote system information is called Gathering Facts. To generate facts, ansible runs the setup module. And the command is
$ ansible- m setup hostname
this will print out a dictionary of all the facts available for that host.
You can also see all the facts using the below command
$ ansible all- m setup
Roles are collections of certain tasks variables and handlers. These Roles are shared over Ansible Galaxy to be reusable/redistributable for other Ansible users as well.
Ansible consist of the following components:
Let say, suppose these hosts have different ports, username and connection type as one is linux and other is windows machine.
Setting variables in the inventory file is the easiest way for this as shown:
abc.example.com ansible_port=8000 ansible_user=user1 ansible_connection=ssh
xyz.example.com ansible_port=8001 ansible_user=user2 ansible_connection=winrm
To see all the inventory variables execute the following command:
$ansible -m debug -a var=hostvars[web_servers] localhost
Ansible can do the following:
Ansible is written in Python, PowerShell and in Ruby by Michael DeHaan.
Both Ansible and Ansible Tower are Red Hat products, both are complete automation platforms with the following features:
Yes, Ansible is an open source tool which is a powerful automation software tool for configuration management from RedHat.
Ansible can configure windows systems, but Windows systems can’t be an ansible server without virtualization. Ansible Server should be a Linux machine with ssh and python 2.6+ version installed.