- 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 ]
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
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 ProgramsList of all the ansible modules
Ansible 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.
Integrations Using AnsibleSplunk
Many 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.