About RedHat:
Red Hat, Inc. is an American multinational software company that is the world's leading provider of enterprise open source solutions.
About Ansible:
Ansible is an open source configuration management, and application-deployment tool that ends repetitive tasks and frees up DevOps teams for more strategic work.
Installing Ansible
- pip3 install ansible
- yum installed ansible
- Controller Node~
- Managed Node~
- Ansible Inventory~
- Host User Authentication~
- Ansible Configuration~
- Ad-Hoc Commands~
- Ansible Playbooks~
โฃ Ansible is agentless
So, we need to install ansible only on the Controller Node.
Ways to install Ansible
[ Python3 installed on Control Node ]
[ Pre configured yum with additional epel repo ]
Ansible Architecture
Controller Node also referred to as Master Node as the name suggests is the epitome of the Ansible architecture and this is where we run the tasks and playbooks.
Managed Nodes are the worker nodes that needs to be configured.
How does Ansible work:
- The inventory consists of the hosts that we want to configure.
- We need to authenticate the user either with ssh-key or using the help of password authentication.
- The ansible.cfg file consists of the location of the inventory, and other necessary ansible parameters
Sample GitHub ansible.cfg template
Once we have a stable connectivity with the hosts we can proceed with the configurations
How do we automate the host configuration using ansible?
Ansible Ad-Hoc Commands uses the /usr/bin/ansible command line tool to automate a singletask on the Managed hosts. ansible hostgroup/ip -m module
What are Modules?
Ansible Modules are standalone scripts that can be used by the Ansible API or Playbooks Programs
List of all the ansible modulesAnsible Playbooks are blueprints of automation tasks, which record and execute Ansible's configuration, deployment and orchestartion function.
What are Ansible Roles?
Ansible Roles lets us automatically load variables, tasks, handlers and other Ansible artifacts based on a known file structure.
Roles Hierarchy
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jayufc7s2imo3qp97ikd.png)
Integrations Using Ansible
SplunkMany of today's top organizations are using Splunk & Ansible.
Splunk and ansible are complimentary to each other.
Using Ansible Tower built in logging integrations we can pass our ops data describing our infrastructure from Ansible Tower to Splunk.
Other integrations include Microsoft Azure, AWS, GCP ....
source: Redhat(https://www.redhat.com/en), Ansible(https://www.ansible.com/)
Thanks for reading โกโก
Top comments (0)