ONTAP Discussions

Ansile - module "na_ontap_command"

Jamison
1,814 Views
Hi,
 
when I enable " return_dict: true", I saw the error message as below.  hope someone help me to fix this problem. Thank you very much.
 
Command:
=========================================================
$ ansible-playbook -i hosts deploy_cmode_filer.yml -e password=xxxxxxxxxx -e filername='lab6290.xxx.xxx.xxx.xxx' -e 'ansible_python_interpreter=/usr/bin/python2' -vvv
 
My Environment:
=========================================================
python2.7
netapp-lib    2019.12.20
ansible 2.9.2
NetApp Release 9.1P16: Wed Nov 14 19:51:52 UTC 2018
 
 
Playbook Task:
=========================================================
- name: run ontap cli command - network interface revert *
  na_ontap_command:
  hostname: "{{ netapp_login.hostname }}"
  username: "{{ netapp_login.username }}"
  password: "{{ netapp_login.password }}"
  http_port: "{{ netapp_login.http_port }}"
  https: "{{ netapp_login.https }}"
  validate_certs: "{{ netapp_login.validate_certs }}"
  command: ['network', 'interface', 'revert', '*']
  privilege: 'admin'
  return_dict: true
 
 
Error Message:
=========================================================

The full traceback is:
Traceback (most recent call last):
File "/Users/jamison/.ansible/tmp/ansible-tmp-1577433089.83-194571896379923/AnsiballZ_na_ontap_command.py", line 102, in <module>
_ansiballz_main()
File "/Users/jamison/.ansible/tmp/ansible-tmp-1577433089.83-194571896379923/AnsiballZ_na_ontap_command.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/Users/jamison/.ansible/tmp/ansible-tmp-1577433089.83-194571896379923/AnsiballZ_na_ontap_command.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.storage.netapp.na_ontap_command', init_globals=None, run_name='__main__', alter_sys=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 188, in run_module
fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py", line 228, in <module>
File "/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py", line 224, in main
File "/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py", line 149, in apply
File "/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py", line 135, in run_command
File "/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py", line 187, in parse_xml_to_dict
ValueError: invalid literal for int() with base 10: 'u1'

fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/Users/jamison/.ansible/tmp/ansible-tmp-1577433089.83-194571896379923/AnsiballZ_na_ontap_command.py\", line 102, in <module>\n _ansiballz_main()\n File \"/Users/jamison/.ansible/tmp/ansible-tmp-1577433089.83-194571896379923/AnsiballZ_na_ontap_command.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/Users/jamison/.ansible/tmp/ansible-tmp-1577433089.83-194571896379923/AnsiballZ_na_ontap_command.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.storage.netapp.na_ontap_command', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 188, in run_module\n fname, loader, pkg_name)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py\", line 228, in <module>\n File \"/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py\", line 224, in main\n File \"/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py\", line 149, in apply\n File \"/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py\", line 135, in run_command\n File \"/var/folders/9v/p4h3q3kj1d797524kmfcl1y00000gn/T/ansible_na_ontap_command_payload_NKKjNV/ansible_na_ontap_command_payload.zip/ansible/modules/storage/netapp/na_ontap_command.py\", line 187, in parse_xml_to_dict\nValueError: invalid literal for int() with base 10: 'u1'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

 

Thanks,

Jamison

0 REPLIES 0
Public