since i moved to python 3.6 and modernized some of my modules with 
futurize/pasteurize ansible is not able du import  the future module and 
failes to run. this is the case with both 2.7 and 3.6.

python 3.6

(root) root@lpgaixmgmtlx01:/etc/ansible/aix>ansible-playbook -vvv 
refresh_facts_cache.yml
ansible-playbook 2.7.10
  config file = /etc/ansible/aix/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/rh/rh-python36/root/usr/lib/python3.
6/site-packages/ansible
  executable location = /opt/rh/rh-python36/root//bin/ansible-playbook
  python version = 3.6.3 (default, Apr 10 2019, 10:26:31) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-16)]
Using /etc/ansible/aix/ansible.cfg as config file
/etc/ansible/aix/dyninv/inventory.py did not meet host_list requirements, 
check plugin documentation if this is unexpected
Parsed /etc/ansible/aix/dyninv/inventory.py inventory source with script 
plugin
...
MSG:

MODULE FAILURE
See stdout/stderr for the exact error


MODULE_STDOUT:

Traceback (most recent call last):
  File 
"/root/.ansible/tmp/ansible-tmp-1557745447.4602132-152979708838555/AnsiballZ_setup.py"
, line 113, in <module>
    _ansiballz_main()
  File 
"/root/.ansible/tmp/ansible-tmp-1557745447.4602132-152979708838555/AnsiballZ_setup.py"
, line 105, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File 
"/root/.ansible/tmp/ansible-tmp-1557745447.4602132-152979708838555/AnsiballZ_setup.py"
, line 48, in invoke_module
    imp.load_module('__main__', mod, module, MOD_DESC)
  File "/tmp/ansible_setup_payload_Qqr__2/__main__.py", line 134, in 
<module>
  File 
"/tmp/ansible_setup_payload_Qqr__2/ansible_setup_payload.zip/ansible/module_utils/facts/__init__.py"
, line 34, in <module>
  File 
"/tmp/ansible_setup_payload_Qqr__2/ansible_setup_payload.zip/ansible/module_utils/facts/compat.py"
, line 33, in <module>
  File 
"/tmp/ansible_setup_payload_Qqr__2/ansible_setup_payload.zip/ansible/module_utils/facts/default_collectors.py"
, line 39, in <module>
  File 
"/tmp/ansible_setup_payload_Qqr__2/ansible_setup_payload.zip/ansible/module_utils/facts/system/distribution.py"
, line 17, in <module>
ImportError: No module named future


python 2.7

root@lpgaixmgmtlx01:/etc/ansible/aix>ansible-playbook -vvv 
refresh_facts_cache.yml
ansible-playbook 2.7.10
  config file = /etc/ansible/aix/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u
'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Mar 26 2019, 22:07:57) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-36)]
Using /etc/ansible/aix/ansible.cfg as config file
/etc/ansible/aix/dyninv/inventory.py did not meet host_list requirements, 
check plugin documentation if this is unexpected
Parsed /etc/ansible/aix/dyninv/inventory.py inventory source with script 
plugin
...
Traceback (most recent call last):
  File 
"/root/.ansible/tmp/ansible-tmp-1557745590.58-192426540045814/AnsiballZ_setup.py"
, line 113, in <module>
    _ansiballz_main()
  File 
"/root/.ansible/tmp/ansible-tmp-1557745590.58-192426540045814/AnsiballZ_setup.py"
, line 105, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File 
"/root/.ansible/tmp/ansible-tmp-1557745590.58-192426540045814/AnsiballZ_setup.py"
, line 48, in invoke_module
    imp.load_module('__main__', mod, module, MOD_DESC)
  File "/tmp/ansible_setup_payload_ERgtGr/__main__.py", line 134, in 
<module>
  File 
"/tmp/ansible_setup_payload_ERgtGr/ansible_setup_payload.zip/ansible/module_utils/facts/__init__.py"
, line 34, in <module>
  File 
"/tmp/ansible_setup_payload_ERgtGr/ansible_setup_payload.zip/ansible/module_utils/facts/compat.py"
, line 33, in <module>
  File 
"/tmp/ansible_setup_payload_ERgtGr/ansible_setup_payload.zip/ansible/module_utils/facts/default_collectors.py"
, line 39, in <module>
  File 
"/tmp/ansible_setup_payload_ERgtGr/ansible_setup_payload.zip/ansible/module_utils/facts/system/distribution.py"
, line 17, in <module>
ImportError: No module named future




the future module is installed in both environments:

root@lpgaixmgmtlx01:/etc/ansible/aix>python
Python 2.7.5 (default, Mar 26 2019, 22:07:57)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import future
>>>

root@lpgaixmgmtlx01:/etc/ansible/aix>source /opt/rh/rh-python36/root/bin/
activate
(root) root@lpgaixmgmtlx01:/etc/ansible/aix>python
Python 3.6.3 (default, Apr 10 2019, 10:26:31)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import future
>>>




what am i missing here?


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/82ffc343-7cf9-4fb3-8bd3-ce7fb0d4f52c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to