# Ansible

### Intro

It is a operations tool that provides

1. IT automation
2. Configuration management
3. Automatic deployment

***

### Push/Pull Architecture

#### Pull Architecture

* Nodes check with the server periodically and fetch the configurations from it
* Examples are **Chef** & **Puppet**
* Requires clients to be installed on the nodes i.e Master/Slave architecture

#### Push Architecture

* Server pushes configuration via ansible modules (small programs) to the nodes
* **Ansible** uses the push architecture
* It uses agentless approach since it uses SSH to deploy the configuration on the nodes
* We can also use custom authentication protocols like **Kerberos** via plugins

***

### Ansible Architecture

* Have a Local Machine where Ansible is installed
* Nodes are the systems to be configured. They are controlled by the local machine
* Module is collection of configuration files
  * These config files are called [playbooks](https://notes.nomanaziz.me/devops/infrastructure-as-a-code-iac/ansible/1.-playbooks)
* [Inventory](https://notes.nomanaziz.me/devops/infrastructure-as-a-code-iac/ansible/3.-inventory) is a document that groups the nodes under specific labels

<figure><img src="https://1920086362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDfv51K0WXLZdwTryHQZc%2Fuploads%2FRqqLpuJl7YVtY3oSsEnn%2Fimage.png?alt=media&#x26;token=73176353-9715-44cf-9201-2911e67a8001" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.nomanaziz.me/devops/infrastructure-as-a-code-iac/ansible.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
