Ansible OEL 8 DevOps · OEL 8 · Beginner

AnsibleIntroduction & Architecture

What Ansible is, why it became the default config-management choice, and how a control node orchestrates dozens of managed nodes over plain SSH — with no agent installed on the target.

Ansible is an agent-less, push-based automation engine. You write what the desired end state looks like in YAML, run ansible-playbook from your laptop or CI runner (the control node), and Ansible reaches out over SSH to one or more managed nodes to make reality match the declaration.

Control Node your laptop / CI runner Playbook (.yml) Inventory ansible-playbook CLI SSH (22) db1.example.com 192.168.56.11 MySQL primary db2.example.com 192.168.56.12 MySQL replica web1.example.com 192.168.56.21 Nginx + app Managed Nodes — pure Python only, no agent push-based execution from control node Agent-less · Idempotent · YAML-driven

There is nothing to install on the managed nodes beyond what comes with a stock OEL 8 image — Python 3 ships in the base install. Ansible compiles each task into a small Python script, copies it over SSH, executes it, captures the result, and removes it. The remote machine doesn't run any persistent daemon, doesn't open any extra ports, and doesn't need an Ansible-specific account.

DimensionAnsibleChef / Puppet / Salt
ArchitectureAgent-less, push-basedAgent-based, pull-based
LanguageYAML (declarative)Ruby DSL / custom DSL
BootstrapSSH + Python 3 (already on OEL 8)Install agent on every node first
Learning curveHoursDays
Best forApp config, orchestration, ad-hoc fixesLong-running fleet management
TermWhat it is
Control nodeThe machine that runs ansible-playbook. Your laptop or a CI runner.
Managed nodeA target server Ansible configures over SSH (the OEL 8 boxes in our labs).
InventoryList of hosts and groups Ansible can talk to. INI or YAML file, or a dynamic plugin.
ModuleThe unit of work. ansible.builtin.user, community.mysql.mysql_db, etc.
TaskOne invocation of a module with arguments.
PlayA mapping of which hosts to which tasks.
PlaybookA YAML file containing one or more plays.
RoleA reusable bundle of tasks, variables, templates, and files.
CollectionA namespaced bundle of roles + modules + plugins, distributed via Galaxy.

Walking through what happens when you run ansible-playbook site.yml:

1. Read playbook parse YAML → tasks 2. Resolve hosts match patterns 3. Gather facts setup module For each task on each host: Compile module → py Ship scp/sftp Execute on remote Cleanup remove tmp Result: ok / changed / failed → reported back to control node PLAY RECAP — totals per host shown at the end
  1. Read playbook — Ansible parses the YAML and resolves any imports or includes.
  2. Resolve hosts — host patterns (e.g. databases:&production) are matched against the inventory.
  3. Gather facts — runs the setup module on each host to collect OS, network and hardware info.
  4. Per task per host — compile module to Python, ship it via SSH, execute it remotely, clean up.
  5. Recap — at the end every host gets a one-line summary: ok / changed / unreachable / failed.

You don't need a playbook to use Ansible. The simplest possible thing is an ad-hoc command:

BASH — Ad-hoc ping all hosts in inventory
# install ansible on the control node (OEL 8)
sudo dnf install -y python3-pip
pip3 install --user ansible

# create a tiny inventory
echo "[oel8]
192.168.56.11
192.168.56.12" > hosts.ini

# ping every host (uses Python, not ICMP)
ansible -i hosts.ini oel8 -m ansible.builtin.ping
✅ Tip: If you get SUCCESS => ping: pong back from each host, you have a working Ansible setup. Everything else in this series builds on that.

The next 8 pages of Section 1 — Basics walk you through installation, SSH key setup, the ansible.cfg reference, ad-hoc commands, the YAML primer, your first real playbook, the most-used modules, and the meaning of idempotency. By page 9 you'll be writing playbooks comfortably; the database-heavy lab content starts in Section 5.