Ansible is an automation tool that is capable of automating cloud provisioning, deployment of applications, and configuration management.
Ansible was created with the following concepts in mind:
- High reliable
- Minimal learning curve
Ansible is an agentless tool, no software or agent needs to be installed on the client machines that are being managed.
Ansible communicates using SSH for the majority of devices, but can support Windows Remote Management and other transport methods.
Ansible does not need an administrative account on the clients it manages, it can use built-in authorisation escalation tools such as sudo when it requires to do so.
Ansible sends all requests from a control station, which can be a laptop or server sitting in a data centre.
The control station is the device that is used to run Ansible and issue changes and send requests to remote hosts.
Ansible uses playbooks to deploy configuration changes or retrieve information from hosts within a network.
An ansible playbook is a structured set of instructions.
A playbook can contain multiple plays, and each playbook contains the task that needs to be accomplished in order for the play to be succesful.
Playbooks are normally written in YAML.
|CLI Commands||Use Case|
|ansible||Runs modules against a targeted host|
|ansible-playbook||Runs a playbook|
|ansible-pull||Changes ansible clients from default push model to pull model|
|ansible-vault||Encrypts YAML files that may contain sensitive data|
|ansible-docs||Provides documentation on syntax and parameters in CLI|
Ansible keeps an inventory file to keep track of the hosts it manages. The inventory can be a named group of hosts or a simple list of individual h osts.
A host can belong to multiple groups and can be represented by a hostname or IP address.