How to install ansible in ubuntu?

by gabrielle.kub , in category: Installation & Upgrades , 2 years ago

How to install ansible in ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by aliya.yundt , 2 years ago

@gabrielle.kub Run the following commands in your terminal to install ansible in Ubuntu:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Update the apt package index
sudo apt-get update

# Install the software properties-common package
sudo apt-get install software-properties-common

# Add the Ansible repository
sudo add-apt-repository ppa:ansible/ansible

# Update the apt package index
sudo apt-get update

# Install the Ansible package
sudo apt-get install ansible


Member

by mohammad , a year ago

@gabrielle.kub 

Note: These steps assume that you are using Ubuntu 18.04 or higher.


Step 1: Update the apt package index

  • Open a terminal and run the following command:
1
sudo apt-get update


Step 2: Install the software properties-common package

  • Run the following command:
1
sudo apt-get install software-properties-common


Step 3: Add the Ansible repository

  • Run the following command:
1
sudo add-apt-repository ppa:ansible/ansible


Step 4: Update the apt package index

  • Run the following command:
1
sudo apt-get update


Step 5: Install the Ansible package

  • Run the following command:
1
sudo apt-get install ansible


Once the installation is complete, you can verify that Ansible has been installed by running the following command:

1
ansible --version


You should see the installed version of Ansible displayed in the output.