<commit_before>Getting Started
===============

.. contents::
   :depth: 2
   :backlinks: top

Requirements
````````````

Requirements for Ansible are extremely minimal.

Ansible is written for Python 2.6.  If you are running Python 2.5 on an "Enterprise Linux" variant,
your distribution can easily install 2.6 (see instructions in the next section).  Newer versions
of Linux and OS X should already have 2.6.

In additon to Python 2.6, you will want the following packages:

* ``paramiko``
* ``PyYAML``
* ``python-jinja2``

On the managed nodes, you only need Python 2.4 or later, but if you are are running less than Python 2.6 on them, you will
also need:

* ``python-simplejson`` 

.. note::

   Ansible's "raw" module (for executing commands in a quick and dirty
   way) and the copy module -- some of the most basic features in
   ansible -- don't even need that.  So technically, you can use
   Ansible to install python-simplejson using the raw module, which
   then allows you to use everything else.  (That's jumping ahead
   though.)

Python 2.6 EPEL instructions for RHEL and CentOS 5
``````````````````````````````````````````````````

These distributions don't have Python 2.6 by default, but it is easily
installable. If you have not already done so, `configure EPEL
<http://fedoraproject.org/wiki/EPEL>`_

.. code-block:: bash

   $ yum install python26 python26-PyYAML python26-paramiko python26-jinja2

Getting Ansible
```````````````

If you are interested in using all the latest features, you may wish to keep up to date
with the development branch of the git checkout.  This also makes it easiest to contribute
back to the project.  

Instructions for installing from source are below.

Ansible's release cycles are about one month long.  Due to this
short release cycle, any bugs will generally be fixed in the next release versus maintaining 
backports on the stable branch.

You may also wish to follow the `Github project <https://github.com/ansible/ansible>`_ if
you have a github account.  This is also where we keep the issue tracker for sharing
bugs and feature ideas.


Running From Checkout
+++++++++++++++++++++

Ansible is trivially easy to run from a checkout, root permissions are not required
to use it:

.. code-block:: bash

    $ git clone git://github.com/ansible/ansible.git
    $ cd ./ansible
    $ source ./hacking/env-setup

You can optionally specify an inventory file (see :doc:`patterns`) other than /etc/ansible/hosts:

.. code-block:: bash

    $ echo "127.0.0.1" > ~/ansible_hosts
    $ export ANSIBLE_HOSTS=~/ansible_hosts

Now let's test things:

.. code-block:: bash

    $ ansible all -m ping --ask-pass


Make Install
++++++++++++

If you are not working from a distribution where Ansible is packaged yet, you can install Ansible 
using "make install".  This is done through `python-distutils`:

.. code-block:: bash

    $ git clone git://github.com/ansible/ansible.git
    $ cd ./ansible
    $ sudo make install


Via RPM
+++++++

RPMs for the last Ansible release are available for `EPEL
<http://fedoraproject.org/wiki/EPEL>`_ 6 and currently supported
Fedora distributions.  Ansible itself can manage earlier operating
systems that contain python 2.4 or higher.

.. code-block:: bash

    # install the epel-release RPM if needed on CentOS, RHEL, or Scientific Linux
    $ sudo yum install ansible

You can also use the ``make rpm`` command to build an RPM you can
distribute and install:

.. code-block:: bash

    $ git clone git://github.com/ansible/ansible.git
    $ cd ./ansible
    $ make rpm
    $ sudo rpm -Uvh ~/rpmbuild/ansible-*.noarch.rpm

Debian, Gentoo, Arch, Others
++++++++++++++++++++++++++++

Ubuntu builds are available `in a PPA here <https://launchpad.net/~rquillo/+archive/ansible>`_

Debian/Ubuntu package recipes can also be built from the source checkout, run:

.. code-block:: bash

    $ make debian

Gentoo eBuilds are available `on github here <https://github.com/uu/ubuilds>`_

An Arch PKGBUILD is available on `AUR <https://aur.archlinux.org/packages.php?ID=58621>`_
If you have python3 installed on Arch, you probably want to symlink python to python2:<commit_msg>added info of required packages to build rpms<commit_after>Getting Started
===============

.. contents::
   :depth: 2
   :backlinks: top

Requirements
````````````

Requirements for Ansible are extremely minimal.

Ansible is written for Python 2.6.  If you are running Python 2.5 on an "Enterprise Linux" variant,
your distribution can easily install 2.6 (see instructions in the next section).  Newer versions
of Linux and OS X should already have 2.6.

In additon to Python 2.6, you will want the following packages:

* ``paramiko``
* ``PyYAML``
* ``python-jinja2``

On the managed nodes, you only need Python 2.4 or later, but if you are are running less than Python 2.6 on them, you will
also need:

* ``python-simplejson`` 

.. note::

   Ansible's "raw" module (for executing commands in a quick and dirty
   way) and the copy module -- some of the most basic features in
   ansible -- don't even need that.  So technically, you can use
   Ansible to install python-simplejson using the raw module, which
   then allows you to use everything else.  (That's jumping ahead
   though.)

Python 2.6 EPEL instructions for RHEL and CentOS 5
``````````````````````````````````````````````````

These distributions don't have Python 2.6 by default, but it is easily
installable. If you have not already done so, `configure EPEL
<http://fedoraproject.org/wiki/EPEL>`_

.. code-block:: bash

   $ yum install python26 python26-PyYAML python26-paramiko python26-jinja2

Getting Ansible
```````````````

If you are interested in using all the latest features, you may wish to keep up to date
with the development branch of the git checkout.  This also makes it easiest to contribute
back to the project.  

Instructions for installing from source are below.

Ansible's release cycles are about one month long.  Due to this
short release cycle, any bugs will generally be fixed in the next release versus maintaining 
backports on the stable branch.

You may also wish to follow the `Github project <https://github.com/ansible/ansible>`_ if
you have a github account.  This is also where we keep the issue tracker for sharing
bugs and feature ideas.


Running From Checkout
+++++++++++++++++++++

Ansible is trivially easy to run from a checkout, root permissions are not required
to use it:

.. code-block:: bash

    $ git clone git://github.com/ansible/ansible.git
    $ cd ./ansible
    $ source ./hacking/env-setup

You can optionally specify an inventory file (see :doc:`patterns`) other than /etc/ansible/hosts:

.. code-block:: bash

    $ echo "127.0.0.1" > ~/ansible_hosts
    $ export ANSIBLE_HOSTS=~/ansible_hosts

Now let's test things:

.. code-block:: bash

    $ ansible all -m ping --ask-pass


Make Install
++++++++++++

If you are not working from a distribution where Ansible is packaged yet, you can install Ansible 
using "make install".  This is done through `python-distutils`:

.. code-block:: bash

    $ git clone git://github.com/ansible/ansible.git
    $ cd ./ansible
    $ sudo make install


Via RPM
+++++++

RPMs for the last Ansible release are available for `EPEL
<http://fedoraproject.org/wiki/EPEL>`_ 6 and currently supported
Fedora distributions.  Ansible itself can manage earlier operating
systems that contain python 2.4 or higher.

.. code-block:: bash

    # install the epel-release RPM if needed on CentOS, RHEL, or Scientific Linux
    $ sudo yum install ansible

You can also use the ``make rpm`` command to build an RPM you can distribute and install. 
Make sure you've ``rpmbuild`` and ``make`` installed.

.. code-block:: bash

    $ git clone git://github.com/ansible/ansible.git
    $ cd ./ansible
    $ make rpm
    $ sudo rpm -Uvh ~/rpmbuild/ansible-*.noarch.rpm

Debian, Gentoo, Arch, Others
++++++++++++++++++++++++++++

Ubuntu builds are available `in a PPA here <https://launchpad.net/~rquillo/+archive/ansible>`_

Debian/Ubuntu package recipes can also be built from the source checkout, run:

.. code-block:: bash

    $ make debian

Gentoo eBuilds are available `on github here <https://github.com/uu/ubuilds>`_

An Arch PKGBUILD is available on `AUR <https://aur.archlinux.org/packages.php?ID=58621>`_
If you have python3 installed on Arch, you probably want to symlink python to python2:
{'fraction_non_alphanumeric': 0.11427211046304012, 'fraction_numerical': 0.01095107725270801, 'mean_word_length': 3.7415349887133185, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2205123', 'n_tokens_mistral': 2716, 'n_tokens_neox': 2428, 'n_words': 1081}