diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2017-09-01 20:49:01 -0700 |
---|---|---|
committer | scottb <dharmabumstead@users.noreply.github.com> | 2017-09-01 20:49:01 -0700 |
commit | 13b2bedae6aa56db4213c14f361bec7aa56972fb (patch) | |
tree | 4da50cab92f925350b94ca716f07bcecbee6b671 /docs | |
parent | 55fb18b85c85fcdc44c168feae993adb3d75863b (diff) | |
download | ansible-13b2bedae6aa56db4213c14f361bec7aa56972fb.tar.gz |
Make python3 testing doc clearer for distro packaging users (#28948)
https://bugzilla.redhat.com/show_bug.cgi?id=1486612
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docsite/rst/python_3_support.rst | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/docs/docsite/rst/python_3_support.rst b/docs/docsite/rst/python_3_support.rst index bda862db15..3e05ca4566 100644 --- a/docs/docsite/rst/python_3_support.rst +++ b/docs/docsite/rst/python_3_support.rst @@ -13,9 +13,9 @@ Ansible 2.2 features a tech preview of Python 3 support. This topic discusses ho intended for production use. To report a Python 3 bug, please see `Community Information & Contributing <http://docs.ansible.com/ansible/community.html#i-d-like-to-report-a-bug>`_. Testing Python 3 with commands and playbooks ----------------------------------------------------- +-------------------------------------------- -* `Install Ansible 2.2+ <http://docs.ansible.com/ansible/intro_installation.html>`_ +* `Run Ansible 2.2+ :ref:`from_source` * To test Python 3 on the controller, run your ansible command via ``python3``. For example: @@ -24,6 +24,23 @@ Testing Python 3 with commands and playbooks python3 /usr/bin/ansible localhost -m ping python3 /usr/bin/ansible-playbook sample-playbook.yml +You can also install Ansible using :program:`pip` for Python3 which will make the default +:command:`/usr/bin/ansible` run with Python3: + +.. code-block:: shell + + $ virtualenv py3-ansible + $ source ./bin/activate + $ pip3 install ansible + $ ansible --version|grep python + python version = 3.5.3 (default, May 10 2017, 15:05:55) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] + +.. note:: Individual Linux distribution packages may be packaged for Python2 or Python3. When running from + distro packages you'll only be able to use Ansible with the Python version for which it was + installed. Sometimes distros will provide a means of installing for several Python versions + (via a separate package or via some commands that are run after install). You'll need to check + with your distro to see if that applies in your case. + Testing Python 3 module support -------------------------------- |