Ansible Control Node Installation
The whole install is one package on one machine. What is worth knowing is what that package actually contains - seven separate commands, and several hundred modules bundled as collections - and the difference between the `ansible` package and `ansible-core`, which is the distinction the exam and every upgrade note cares about.
Control Node and Managed Nodes Guide 2 of 45 Beginner
- OSUbuntu 26.04 LTS
- ansible-core2.20.1
- Python3.14.4
- TimeAbout 12 min
- Reviewed23 August 2026
Written against the versions above. `ansible-core` is the engine plus the `ansible.builtin` collection. The `ansible` package is that PLUS a large bundle of community collections. On Ubuntu, `apt install ansible` pulls both. Installing with `pip install ansible-core` instead gives you the engine only, which is the lighter and more predictable choice when you manage your own collections.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| ANS-CTL01 | 192.168.0.36 | Ubuntu 26.04 LTS | Ansible Control Node | 2 Core | 3 GB | 50 GB |
| ANS-A01 | 192.168.0.37 | Ubuntu 26.04 LTS | Managed Node (group: web) | 2 Core | 3 GB | 50 GB |
| ANS-B01 | 192.168.0.38 | Ubuntu 26.04 LTS | Managed Node (group: db) | 2 Core | 3 GB | 50 GB |
Before you start
- A machine with
sudoand network access to the distribution's repositories. - Ansible was purged before this session so the install is a real first install, not a no-op.
-
Nothing installed yet
Starting from a genuinely clean machine:
ansible: not installedPython 3.14.4Python is already there - it is part of the base system, not something Ansible needs you to add. On the control node Ansible needs Python for itself; on the managed nodes it needs one to run modules. Same requirement, different reason.
bash Example session sudo DEBIAN_FRONTEND=noninteractive apt-get purge -y ansible ansible-core 2>&1 | tail -3Processing triggers for man-db (2.13.1-1build1)…(Reading database…(Reading database… 5%(Reading database… 10%(Reading database… 15%(Reading database… 20%(Reading database… 25%(Reading database… 30%(Reading database… 35%(Reading database… 40%(Reading database… 45%(Reading database… 50%(Reading database… 55%(Reading database… 60%(Reading database… 65%(Reading database… 70%(Reading database… 75%(Reading database… 80%(Reading database… 85%(Reading database… 90%(Reading database… 95%(Reading database… 100%(Reading database… 101287 files and directories currently installed.)Purging configuration files for ansible (13.1.0+dfsg-1ubuntu1)…sudo apt-get autoremove -y 2>&1 | tail -2Removing python3-xmltodict (1.0.3-1)…Processing triggers for man-db (2.13.1-1build1)…command -v ansible || echo "ansible: not installed"ansible: not installedpython3 -VPython 3.14.4Expected resultNo ansible binary, and a Python that was already present.
Success conditionYou have a clean starting point rather than an assumed one.
-
Install it
One package:
sudo apt-get install -y ansibleansible [core 2.20.1] config file = /home/sysadmin/ansible.cfgThe version banner is worth reading properly. It reports
core, the config file actually in use, the module search path, the Python running it and the collections locations. When something behaves unexpectedly,ansible --versionanswers 'which Ansible, reading which config' before you start guessing.On RHEL - which is what EX294 uses - the equivalent is
dnf install ansible-core, and the exam expects you to be able to do it from a repository that is already configured.bash Example session sudo apt-get update 2>&1 | tail -2Hit:5 http://deb.gierens.de stable InReleaseReading package lists...sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ansible 2>&1 | tail -6 No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host.ansible --versionansible [core 2.20.1] config file = /home/sysadmin/ansible.cfg configured module search path = ['/home/sysadmin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible ansible collection location = /home/sysadmin/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.14.4 (main, Jun 18 2026, 14:25:02) [GCC 15.2.0] (/usr/bin/python3) jinja version = 3.1.6 pyyaml version = 6.0.3 (with libyaml v0.2.5)Expected resultansible-core 2.20.1 and the config file it will read.
Success conditionYou have a control node, and you know which config it obeys.
-
What you actually got
Not one command - seven:
/usr/bin/ansible /usr/bin/ansible-galaxy /usr/bin/ansible-pull /usr/bin/ansible-config /usr/bin/ansible-inventory /usr/bin/ansible-vault /usr/bin/ansible-console /usr/bin/ansible-playbook /usr/bin/ansible-docThe five that matter for the exam:
ansible- one module against some hosts, right nowansible-playbook- run a playbookansible-doc- module documentation, offlineansible-vault- encrypt secretsansible-galaxy- install roles and collections
and two more worth knowing:
ansible-inventoryto see what your inventory resolves to, andansible-configto see which settings are in force.The package also bundles collections -
amazon.aws,community.general,ansible.posixand dozens more - which is why the download is large and whyansible-corealone is a different proposition.bash Example session ls /usr/bin/ansible*/usr/bin/ansible/usr/bin/ansible-community/usr/bin/ansible-config/usr/bin/ansible-console/usr/bin/ansible-doc/usr/bin/ansible-galaxy/usr/bin/ansible-inventory/usr/bin/ansible-playbook/usr/bin/ansible-pull/usr/bin/ansible-test/usr/bin/ansible-vaultdpkg -l ansible ansible-core 2>/dev/null | awk '/^ii/{print $2, $3}'ansible 13.1.0+dfsg-1ubuntu1ansible-core 2.20.1-1ansible-galaxy collection list 2>/dev/null | head -12 # /usr/lib/python3/dist-packages/ansible/_internal/ansible_collectionsCollection Version---------------------------------------- -------ansible._protomatter * # /usr/lib/python3/dist-packages/ansible_collectionsCollection Version---------------------------------------- -------amazon.aws 10.1.2ansible.netcommon 8.2.0ansible.posix 2.1.0Expected resultNine binaries and a long list of bundled collections.
Success conditionYou know which command does what before you need it.
-
The managed nodes got nothing
ans-a01: no ansible installedans-b01: no ansible installedPython 3.14.4That is the entire configuration of a managed node: an SSH server, a user you can log in as, and a Python interpreter. All three were there before Ansible existed on the network.
It is worth pausing on, because it changes how you think about scale. Adding the hundredth managed node is one line in an inventory file. There is no bootstrap, no enrolment, no certificate exchange and nothing to install.
bash Example session command -v ansible || echo "ans-a01: no ansible installed"ans-a01: no ansible installedcommand -v ansible || echo "ans-b01: no ansible installed"ans-b01: no ansible installedpython3 -VPython 3.14.4Expected resultNo Ansible on either managed node, and a Python on both.
Success conditionYou can add a machine to the fleet by editing one file.
Troubleshooting
ansible --versionshows an unexpected config file.Why: A different
ansible.cfgwas found first.Fix:The banner names it. See guide 4 for the search order.
The distribution's Ansible is older than you want.
Why: Distribution packages lag upstream.
Fix:
pip install --user ansible-corein a virtualenv gives you a specific version without touching the system package.A module is not found although it exists upstream.
Why: It lives in a collection that is not installed.
Fix:
ansible-galaxy collection listshows what you have;ansible-galaxy collection install <name>adds one.