Junior — Middle
Explain the architecture and main components of the Ansible project.
sobes.tech AI
Answer from AI
Ansible is a tool for automation of configuration management and application deployment.
The main components of Ansible architecture:
- Control Node — the machine from which Ansible commands and playbooks are run.
- Managed Nodes (hosts) — target servers managed by Ansible.
- Inventory — a list of managed hosts, which can be in the form of a file or a dynamic script.
- Modules — individual scripts that perform specific tasks on managed hosts (e.g., installing packages, copying files).
- Playbooks — YAML files describing a sequence of tasks to be executed on hosts.
- Plugins — extensions for various functions, such as callback, connection, lookup.
Ansible operates based on SSH connections, without the need to install agents on managed hosts.
Example of a playbook:
- hosts: webservers
tasks:
- name: Install nginx
apt:
name: nginx
state: present