Skip to main content
📬 Get weekly Production AI insightsPractical notes on Kubernetes, AI infrastructure and platform engineering. No spam.Subscribe free
Automation

Install Ansible on Amazon Linux 2023 (Step-by-Step 2026)

Step-by-step guide to install Ansible on Amazon Linux 2023. Copy-paste commands, verify installation, and configure for production.

Luca Berton

· The Production AI Expert

Published ·1 min read

Here is how to install Ansible on Amazon Linux 2023 in 2026. Tested and verified.

Install Ansible

# Install pip
sudo dnf install -y python3-pip

# Install Ansible via pip
pip3 install ansible --user

# Add to PATH
echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bashrc
source ~/.bashrc

Alternative: Virtual Environment

python3 -m venv ~/ansible-venv
source ~/ansible-venv/bin/activate
pip install ansible

Verify

ansible --version
ansible localhost -m ping

Configure for AWS

# Install AWS collection
ansible-galaxy collection install amazon.aws community.aws

# Install boto3 (required for AWS modules)
pip3 install boto3 botocore

Free 30-min Production AI consultation

Book Now