1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #18249 from bwlz/install_doc_updates

Installation document updates
This commit is contained in:
scottb 2016-11-08 13:36:46 -08:00 committed by GitHub
commit 3f2dbea1df

View file

@ -108,85 +108,6 @@ You also need Python 2.4 or later. If you are running less than Python 2.5 on th
Installing the Control Machine
``````````````````````````````
.. _from_source:
Running From Source
+++++++++++++++++++
Ansible is trivially easy to run from a checkout, root permissions are not required
to use it and there is no software to actually install for Ansible itself. 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 also 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 (eg. apt/yum) or pip to install a stable version.
To install from source.
.. code-block:: bash
$ git clone git://github.com/ansible/ansible.git --recursive
$ cd ./ansible
Using Bash:
.. code-block:: bash
$ source ./hacking/env-setup
Using Fish::
$ . ./hacking/env-setup.fish
If you want to suppress spurious warnings/errors, use::
$ source ./hacking/env-setup -q
If you don't have pip installed in your version of Python, install pip::
$ sudo easy_install pip
Ansible also uses the following Python modules that need to be installed [1]_::
$ sudo pip install paramiko PyYAML Jinja2 httplib2 six
Note when updating ansible, be sure to not only update the source tree, but also the "submodules" in git
which point at Ansible's own modules (not the same kind of modules, alas).
.. code-block:: bash
$ git pull --rebase
$ git submodule update --init --recursive
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 :doc:`intro_inventory`)
other than /etc/ansible/hosts:
.. code-block:: bash
$ echo "127.0.0.1" > ~/ansible_hosts
$ export ANSIBLE_INVENTORY=~/ansible_hosts
.. note::
ANSIBLE_INVENTORY is available starting at 1.9 and substitutes the deprecated ANSIBLE_HOSTS
You can read more about the inventory file in later parts of the manual.
Now let's test things with a ping command:
.. code-block:: bash
$ ansible all -m ping --ask-pass
You can also use "sudo make install" if you wish.
.. _from_yum:
Latest Release Via Yum
@ -242,7 +163,25 @@ Debian/Ubuntu packages can also be built from the source checkout, run:
You may also wish to run from source to get the latest, which is covered above.
.. _from_pkg:
Latest Releases Via Apt (Debian)
++++++++++++++++++++++++++++++++
Debian users may leverage the same source as the Ubuntu PPA.
Add the following line to /etc/apt/sources.list:
.. code-block:: bash
deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
Then run these commands:
.. code-block:: bash
$ sudo apt-get update
$ sudo apt-get install ansible
.. note:: This method has been verified with the Trusty sources in Debian Jessie and Stretch but may not be supported in earlier versions.
Latest Releases Via Portage (Gentoo)
++++++++++++++++++++++++++++++++++++
@ -347,6 +286,84 @@ Packaging Ansible or wanting to build a local package yourself, but don't want t
These releases are also tagged in the `git repository <https://github.com/ansible/ansible/releases>`_ with the release version.
.. _from_source:
Running From Source
+++++++++++++++++++
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.
To install from source.
.. code-block:: bash
$ git clone git://github.com/ansible/ansible.git --recursive
$ cd ./ansible
Using Bash:
.. code-block:: bash
$ source ./hacking/env-setup
Using Fish::
$ . ./hacking/env-setup.fish
If you want to suppress spurious warnings/errors, use::
$ source ./hacking/env-setup -q
If you don't have pip installed in your version of Python, install pip::
$ sudo easy_install pip
Ansible also uses the following Python modules that need to be installed [1]_::
$ sudo pip install paramiko PyYAML Jinja2 httplib2 six
Note when updating ansible, be sure to not only update the source tree, but also the "submodules" in git
which point at Ansible's own modules (not the same kind of modules, alas).
.. code-block:: bash
$ git pull --rebase
$ git submodule update --init --recursive
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 :doc:`intro_inventory`)
other than /etc/ansible/hosts:
.. code-block:: bash
$ echo "127.0.0.1" > ~/ansible_hosts
$ export ANSIBLE_INVENTORY=~/ansible_hosts
.. note::
ANSIBLE_INVENTORY is available starting at 1.9 and substitutes the deprecated ANSIBLE_HOSTS
You can read more about the inventory file in later parts of the manual.
Now let's test things with a ping command:
.. code-block:: bash
$ ansible all -m ping --ask-pass
You can also use "sudo make install".
.. seealso::
:doc:`intro_adhoc`