Install Ansible¶
Ansible is an open-source IT automation tool that configures systems, deploys applications, and orchestrates multi-step workflows over SSH — without requiring an agent on managed nodes.
Ubuntu and its derivatives only
This script uses the official ppa:ansible/ansible PPA, which is only available for Ubuntu-based systems. It is not supported on RHEL, Fedora, Alpine, or other distributions.
Not for production use
This installer is designed for lab and learning environments. For production, manage Ansible through a virtualenv or a pinned package version to avoid unexpected upgrades.
What Gets Installed¶
| Component | Source | Purpose |
|---|---|---|
software-properties-common | Ubuntu APT | Required to add PPAs |
ansible | ppa:ansible/ansible (official) | Automation engine |
Prerequisites¶
- Ubuntu or an Ubuntu-based OS
curlavailable- Run as root or with
sudo
Install¶
curl -fsSL https://raw.githubusercontent.com/ibtisam-iq/silver-stack/main/scripts/installers/install-ansible.sh | sudo bash
Idempotent — safe to re-run
The script checks both the ansible binary in PATH and the ansible Python package. If either is present, it exits without reinstalling.
What the Script Does¶
- Runs preflight checks (OS, connectivity, root access)
- Installs
software-properties-common(required to manage PPAs) - Adds the official
ppa:ansible/ansiblerepository - Installs
ansibleviaapt-get - Runs a dual post-install check — verifies both
ansiblebinary inPATHand the Python package import