What is Ansible?

Ansible is an open-source IT automation engine that automates cloud provisioning, configuration management, application deployment, and intra-service orchestration. It uses a declarative language (YAML) to describe the desired state of your systems.

Ansible

1. How it Works: Agentless Architecture

Unlike many other automation tools, Ansible is agentless. You don't need to install any software on the "Managed Nodes" (the servers you are configuring). It communicates over standard **SSH** (for Linux) or **WinRM** (for Windows).

  • Control Node: The machine where Ansible is installed.
  • Managed Nodes: The network devices or servers managed by the Control Node.
  • Inventory: A file containing the list of Managed Nodes.

2. Key Concepts

To master Ansible, you need to understand its building blocks:

  • Playbooks: YAML files where automation tasks are defined.
  • Modules: Small programs that Ansible pushes to nodes to execute specific tasks (e.g., installing a package).
  • Idempotency: A core feature where a task is only executed if a change is needed. If the system is already in the desired state, Ansible does nothing.

3. Why Choose Ansible?

Feature Benefit
SimpleUses human-readable YAML scripts.
AgentlessReduced overhead and better security.
PowerfulCan model complex multi-tier workflows.
FlexibleWorks across Cloud, On-prem, and Containers.

Knowledge Check

1. Which language is used to write Ansible Playbooks?
A) Python | B) YAML | C) HTML

2. What does "Agentless" mean in Ansible?
A) No internet required | B) No software needs to be installed on managed nodes | C) It doesn't use SSH

3. If a server is already configured correctly, what will Ansible do?
A) Reinstall everything | B) Nothing (Idempotency) | C) Delete the server