Ansible Installation on Linux (Ubuntu / CentOS)
Ubuntu
- Update package lists:
sudo apt-get update
- Install required packages:
sudo apt-get install -y software-properties-common
- Add Ansible PPA:
sudo add-apt-repository --yes --update ppa:ansible/ansible
- Install Ansible:
sudo apt-get install -y ansible
- Verify installation:
ansible --version
CentOS
- Update packages:
sudo yum update -y
- Enable EPEL repository:
sudo yum install -y epel-release
- Install Ansible:
sudo yum install -y ansible
- Verify installation:
ansible --version
信息
pip install --upgrade cryptography paramiko
Notes
- This setup installs Ansible on a single host for running playbooks.
- No additional SSH configuration or Docker setup is included.
- For multi-node management, Ansible requires SSH access to target hosts, but that is outside the scope of this document.