Installing Ansible on Linux
In this lesson, you'll learn how to install Ansible on your ansible-controller VM that you set up in the previous lessons. Additionally, if you are using a Linux-based host computer, the process to install Ansible directly on your host will be similar. By the end of this lesson, you'll have Ansible installed and ready for automation tasks.
Preparing for Installation
Before installing Ansible, make sure your system is up to date. Open a terminal on your Ansible Controller VM or your Linux host and run the following commands:
Installing Ansible
- Add Ansible's Official PPA (Personal Package Archive) : Ansible can be installed from its official PPA, which often contains the latest version compared to what might be in the default repositories. On your Ansible Controller VM or Linux host, add the PPA by typing:
sudo apt-add-repository ppa:ansible/ansible
- Update Your Package List : After adding the PPA, update your package list to include the newly added repository:
sudo apt update
- Install Ansible : Now, you can install Ansible with:
sudo apt install ansible
This command will install Ansible and any required dependencies.
- Verify the Installation : Once the installation is complete, you can verify it by checking the Ansible version:
ansible --version
This command should return the version of Ansible that was installed, confirming that the installation was successful as shown below:
No comments yet. Add the first comment to start the discussion.