Erreurs après install de Ansible

Bonsoir à tous,

Je souhaite m’initier à ansible et pour cela j’ai installé le projet via pip3 :

[code]$ pew new ansible
Using base prefix '/usr’
New python executable in /home/user01/.virtualenvs/ansible/bin/python3
Also creating executable in /home/user01/.virtualenvs/ansible/bin/python
Installing setuptools, pip, wheel…done.
Launching subshell in virtual environment. Type ‘exit’ or ‘Ctrl+D’ to return.
ansible>$ pip3 install ansible

Collecting ansible
Downloading ansible-2.0.0.2.tar.gz (1.5MB)
100% |████████████████████████████████| 1.5MB 22kB/s
Collecting paramiko (from ansible)
Downloading paramiko-1.16.0-py2.py3-none-any.whl (169kB)
100% |████████████████████████████████| 172kB 23kB/s
Collecting jinja2 (from ansible)
Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
100% |████████████████████████████████| 266kB 37kB/s
Collecting PyYAML (from ansible)
Downloading PyYAML-3.11.tar.gz (248kB)
100% |████████████████████████████████| 249kB 70kB/s
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./.virtualenvs/ansible/lib/python3.4/site-packages (from ansible)
Collecting pycrypto>=2.6 (from ansible)
Downloading pycrypto-2.6.1.tar.gz (446kB)
100% |████████████████████████████████| 446kB 14kB/s
Collecting ecdsa>=0.11 (from paramiko->ansible)
Downloading ecdsa-0.13-py2.py3-none-any.whl (86kB)
100% |████████████████████████████████| 90kB 23kB/s
Collecting MarkupSafe (from jinja2->ansible)
Downloading MarkupSafe-0.23.tar.gz
Building wheels for collected packages: ansible, PyYAML, pycrypto, MarkupSafe
Running setup.py bdist_wheel for ansible … done
Stored in directory: /home/user01/.cache/pip/wheels/17/d5/81/2ba0ea53c50d7ac921b8cfa5eadf689408a8e46c834bf19eb6
Running setup.py bdist_wheel for PyYAML … done
Stored in directory: /home/user01/.cache/pip/wheels/fa/db/f6/dee55793d344f1706dc4a5a693298f0115241d1085cc212364
Running setup.py bdist_wheel for pycrypto … done
Stored in directory: /home/user01/.cache/pip/wheels/96/b0/e6/03e439d41cb2592b5c4c9c77873761d6cbd417b332076680cd
Running setup.py bdist_wheel for MarkupSafe … done
Stored in directory: /home/user01/.cache/pip/wheels/94/a7/79/f79a998b64c1281cb99fa9bbd33cfc9b8b5775f438218d17a7
Successfully built ansible PyYAML pycrypto MarkupSafe
Installing collected packages: pycrypto, ecdsa, paramiko, MarkupSafe, jinja2, PyYAML, ansible
Successfully installed MarkupSafe-0.23 PyYAML-3.11 ansible-2.0.0.2 ecdsa-0.13 jinja2-2.8 paramiko-1.16.0 pycrypto-2.6.1[/code]
Tout semble donc s’être bien passé.
Cependant, lorsque je tente un [mono]ansible>$ ansible-doc -l[/mono] j’obtient les erreurs suivantes :

[code]ansible>$ ansible-doc -l
[ERROR]: unable to parse /home/user01/.virtualenvs/ansible/lib/python3.4/site-packages/ansible/modules/core/cloud/amazon/_ec2_ami_search.py

[ERROR]: unable to parse /home/user01/.virtualenvs/ansible/lib/python3.4/site-packages/ansible/modules/core/cloud/openstack/_glance_image.py

ERROR! module _glance_image has a documentation error formatting or is missing documentation[/code]
Les deux fichiers existent bien et semblent (via un aperçu sous vim) corrects.
J’ai désinstallé ansible + détruit l’environnement virtuel puis ré-installé le tout : même résultat.
J’ai fait une recherche sur le forum puis sur le Net mais sans succès.

Pour info :

ansible>$ ansible-doc --version ansible-doc 2.0.0.2 config file = configured module search path = Default w/o overrides
et

ansible>$ uname -a Linux host01 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
Quelqu’un aurait-il une idée d’où viendrait le souci, svp ?

Merci d’avance,
Eric

C’est bon, j’ai trouvé !

Le problème vient du fait qu’Ansible n’est pour l’instant pas compatible avec Python 3, comme indiqué ici.

[quote]Note

Python 3 is a slightly different language than Python 2 and most Python programs (including Ansible) are not switching over yet. However, some Linux distributions (Gentoo, Arch) may not have a Python 2.X interpreter installed by default. On those systems, you should install one, and set the ‘ansible_python_interpreter’ variable in inventory (see Inventory) to point at your 2.X Python. Distributions like Red Hat Enterprise Linux, CentOS, Fedora, and Ubuntu all have a 2.X interpreter installed by default and this does not apply to those distributions. This is also true of nearly all Unix systems.[/quote]
Il faut donc créer un environnement virtuel pour Python 2.7 et utiliser la version pip adéquate :

$ pew new ansible -p python2.7 ansible>$ pip install ansible
Il faut de plus que la version 2.7 du paquet python-dev soit préalablement installé.

Merci à tous ceux qui m’ont lu…
Eric