---
title: "How to Install Ansible on a Linux Server"
description: "Installing Ansible is the first step to automating tasks to save time. Below, we cover how to get started with Ansible depending on your operating system (OS). Ansible Installation Methods Before you..."
url: https://www.inmotionhosting.com/support/edu/ansible/install-ansible/
date: 2020-03-03
modified: 2026-06-05
author: "InMotion Hosting Contributor"
categories: ["Ansible Tutorials"]
type: post
lang: en
---

# How to Install Ansible on a Linux Server

Installing [Ansible](https://www.inmotionhosting.com/ansible) is the first step to automating tasks to save time. Below, we cover how to get started with Ansible depending on your operating system (OS).

## Ansible Installation Methods

Before you begin, open your terminal (or [SSH for server installation](https://www.inmotionhosting.com/support/server/ssh/how-to-login-ssh/)), ensure you have [Python version 2.7 or 3.5+](https://www.inmotionhosting.com/support/server/linux/find-python-version/) , and note your Linux server version: `cat /etc/release` .

### Ansible PIP Installation

We recommend you consider using [Python Installs Packages (PIP)](https://pip.pypa.io/en/stable/installing/) to install Ansible, especially if you’re already using it. [Python Package Index](https://pypi.org/) is updated more regularly than many Linux package management systems. This also guarantees compatibility with InMotion Hosting Ansible Galaxy roles, which require PIP packages.

1. Check if it’s installed: `pip -V`
2. [Install PIP](https://pip.pypa.io/en/stable/installing/) if needed
3. Install Ansible with PIP: `pip install --user ansible`

### Package Manager

If you prefer to use your native package manager, follow [official Ansible documentation](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for your operating system (OS) - [CentOS](https://www.inmotionhosting.com/support/edu/software/centos-server-overview/), [Ubuntu](https://www.inmotionhosting.com/support/edu/software/ubuntu-server-overview/), [Debian](https://www.inmotionhosting.com/support/product-guides/cloud-server/debian-8/), Arch Linux, etc.

## Server Installation with our Ansible Management Container

InMotion Hosting customers on a [Cloud Server](https://www.inmotionhosting.com/cloud-vps) or Dedicated [Bare-Metal Server](https://www.inmotionhosting.com/bare-metal-servers) can get started with our **Ansible Management Container in AMP**. Running your Ansible tasks on a dedicated Ansible agent ensures stable network connectivity while freeing up your local resources. It also includes the GNU Screen and Tmux terminal multiplexers to ensure your playbooks complete even if the network connection ends prematurely, and more.

This is great for users who may want technical assistance from our [InMotion Solutions team](https://www.inmotionhosting.com/solutions/inmotion-solutions). We're familiar with the configuration. The Ansible Agent is highly available and includes all dependencies required to deploy software from our Ansible Catalog.

Create a [snapshot in Account Management Panel (AMP)](https://www.inmotionhosting.com/support/product-guides/vps-hosting/snapshots/) before continuing in case anything goes wrong.

1. [Log in to AMP](https://www.inmotionhosting.com/support/amp/how-to-log-into-amp/)
2. Click the **Ansible** button under *Manage My Account*
3. [Add your SSH Key](https://www.inmotionhosting.com/support/product-guides/cloud-server/manage-ssh-keys/)
4. On the Ansible page, select **Start Ansible Container**
5. Save your port number and IP address to connect to your Ansible container

![Ansible Container in AMP](https://www.inmotionhosting.com/support/wp-content/uploads/2022/08/ansible-amp-update.png)*Save your port and IP address to connect to your Ansible Management Container*

-->

## Verify Installation

1. [Log in to your Ansible Container](https://www.inmotionhosting.com/support/server/ssh/how-to-login-ssh/) - `ssh ansible@ -p `
2. Check Ansible information such as Ansible version, default [configuration file location](https://www.inmotionhosting.com/support/edu/ansible/ultrastack-ansible-configuration-file/), and Python version: `ansible --version`

After installing your Ansible agent, start learning Ansible IT automation with your first [Ansible playbook](https://www.inmotionhosting.com/support/edu/ansible/create-an-ansible-playbook/) (with an example).
