aruba/aruba-switch-ansible

ImportError: cannot import name 'return_values'

hrv231 opened this issue · 1 comments

Hello,

I'm trying to run this module and I'm getting the below error, please help!!
This is on CentOS

[root@netbox aoss_modules]# ansible-playbook custom_playbook.yml -i ../../hosts -vvvv
ansible-playbook 2.8.0.dev0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.6.7 (default, Dec  5 2018, 15:02:05) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
Parsed /etc/ansible/aruba-switch-ansible/hosts inventory source with yaml plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python3.6/site-packages/ansible/plugins/callback/default.py

PLAYBOOK: custom_playbook.yml **********************************************************************************************************************************************************************************************************************************
Positional arguments: custom_playbook.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/aruba-switch-ansible/hosts',)
forks: 5
1 plays in custom_playbook.yml

PLAY [2300HP2530-24G-PoE] **************************************************************************************************************************************************************************************************************************************
META: ran handlers

TASK [Updates Hostname] ****************************************************************************************************************************************************************************************************************************************
task path: /etc/ansible/aruba-switch-ansible/wiki_docu/aoss_modules/custom_playbook.yml:4
The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 144, in run
    res = self._execute()
  File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 596, in _execute
    self._handler = self._get_action_handler(connection=self._connection, templar=templar)
  File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 1028, in _get_action_handler
    shared_loader_obj=self._shared_loader_obj,
  File "/usr/lib/python3.6/site-packages/ansible/plugins/loader.py", line 427, in get
    self._module_cache[path] = self._load_module_source(name, path)
  File "/usr/lib/python3.6/site-packages/ansible/plugins/loader.py", line 406, in _load_module_source
    module = imp.load_source(to_native(full_name), to_native(path), module_file)
  File "/usr/lib64/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.6/site-packages/ansible/plugins/action/arubaoss.py", line 25, in <module>
    from ansible.module_utils.network.arubaoss.arubaoss import arubaoss_provider_spec
  File "/usr/lib/python3.6/site-packages/ansible/module_utils/network/arubaoss/arubaoss.py", line 32, in <module>
    from ansible.module_utils.basic import env_fallback, return_values
ImportError: cannot import name 'return_values'

fatal: [2300HP2530-24G-PoE]: FAILED! => {
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}

PLAY RECAP *****************************************************************************************************************************************************************************************************************************************************
2300HP2530-24G-PoE         : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Sorry to hear you ran into issue. Please use https://github.com/aruba/aruba-ansible-modules readme to install Ansible modules. There is a script to make it easier to install Ansible modules. This wiki will be updated to point to that. We are working on that part. Please raise an issue if you still run into issues.