Once Ansible is installed, it will not add a database, and there will be no daemons to start or keep running. You only need to install it on one machine (which could easily be a laptop) and it can manage an entire fleet of remote machines from that central point. When Ansible manages remote machines, it does not leave software installed or running on them, so there’s no real question about how to upgrade Ansible when moving to a new version.

Because it runs so easily from source and does not require any installation of software on remote
machines, many users will actually track the development version.

Ansible’s release cycles are usually about four months long. Due to this short release cycle,
minor bugs will generally be fixed in the next release versus maintaining backports on the stable branch.
Major bugs will still have maintenance releases when needed, though these are infrequent.

If you are wishing to run the latest released version of Ansible and you are running Red Hat Enterprise Linux (TM), CentOS, Fedora, Debian, or Ubuntu, we recommend using the OS package manager.

For other installation options, we recommend installing via “pip”, which is the Python package manager, though other options are also available.

If you wish to track the development release to use and test the latest features, we will share
information about running from source. It’s not necessary to install the program to run from source.

Currently Ansible can be run from any machine with Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) installed. Windows isn’t supported for the control machine.

This includes Red Hat, Debian, CentOS, macOS, any of the BSDs, and so on.

Note

macOS by default is configured for a small number of file handles, so if you want to use 15 or more forks you’ll need to raise the ulimit with sudolaunchctllimitmaxfilesunlimited. This command can also fix any “Too many open files” error.

Warning

Please note that some modules and plugins have additional requirements. For modules these need to be satisfied on the ‘target’ machine and should be listed in the module specific docs.

On the managed nodes, you need a way to communicate, which is normally ssh. By
default this uses sftp. If that’s not available, you can switch to scp in
ansible.cfg. You also need Python 2 (version 2.6 or later) or Python 3 (version 3.5 or
later).

Note

If you have SELinux enabled on remote nodes, you will also want to install
libselinux-python on them before using any copy/file/template related functions in Ansible. You
can use the yum module or dnf module in Ansible to install this package on remote systems
that do not have it.

By default, Ansible uses the python interpreter located at /usr/bin/python to run its
modules. However, some Linux distributions may only have a Python 3 interpreter installed to
/usr/bin/python3 by default. On those systems, you may see an error like:

"module_stdout":"/bin/sh:/usr/bin/python:No such file or directory\r\n"

Ansible’s “raw” module (for executing commands in a quick and dirty way) and the script module
don’t even need Python installed. So technically, you can use Ansible to install a compatible
version of Python using the raw module, which then allows you to use everything else.
For example, if you need to bootstrap Python 2 onto a RHEL-based system, you can install it
via

The instructions can be found in Latest Releases Via Pip section. If you are running macOS version 10.12 or older, then you ought to upgrade to the latest pip (9.0.3 or newer) to connect to the Python Package Index securely.

Readers that use virtualenv can also install Ansible under virtualenv, though we’d recommend to not worry about it and just install Ansible globally. Do not use easy_install to install Ansible directly.

Note

Older versions of pip defaults to http://pypi.python.org/simple, which no longer works.
Please make sure you have an updated pip (version 10 or greater) installed before installing Ansible.
Refer here about installing latest pip.

Ansible is easy to run from a checkout - root permissions are not required
to use it and there is no software to actually install. No daemons
or database setup are required. Because of this, many users in our community use the
development version of Ansible all of the time so they can take advantage of new features
when they are implemented and easily contribute to the project. Because there is
nothing to install, following the development version is significantly easier than most
open source projects.

Note

If you are intending to use Tower as the Control Machine, do not use a source install. Please use OS package manager (like apt/yum) or pip to install a stable version.

Once running the env-setup script you’ll be running from checkout and the default inventory file
will be /etc/ansible/hosts. You can optionally specify an inventory file (see Working with Inventory)
other than /etc/ansible/hosts: