When trying to enable support on a recent OnTAP 9.11 node, I get a TypeError from get_modified_attributes in plugins/module_utils/netapp_module.py
TypeError: TypeError("'>' not supported between instances of 'str' and 'bool'",), key: support, value: 'enable', desired: True
$ /opt/server_config/bin/ansible-playbook -c local -m na_ontap_support -a 'state=present support=True hostname=ontap11-system.mydomain username=admin password=mypassword transport=https validate_certs=False node_name=ontap11-system-01' 'localhost' -D -C
Expected Results
On an older version of ONTAP I would expect this to return a SUCCESS or CHANGED, and the command to return the current state of configuration.
However, on ONTAP 9.11.1 it seems that the support current value is returned as a string 'enable', and not interpreted as boolean 'True'. This probably stems from ONTAP changing the way they return this value now.
Actual Results
localhost | FAILED! => {
"changed": false,
"module_stderr": "/opt/server_config/lib64/python3.6/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ontap11-system.mydomain'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/opt/server_config/lib64/python3.6/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ontap11-system.mydomain'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\nTraceback (most recent call last):\n File \"/tmp/ansible_na_ontap_autosupport_payload_qxep8z7y/ansible_na_ontap_autosupport_payload.zip/ansible_collections/netapp/ontap/plugins/module_utils/netapp_module.py\", line 292, in get_modified_attributes\n File \"/tmp/ansible_na_ontap_autosupport_payload_qxep8z7y/ansible_na_ontap_autosupport_payload.zip/ansible_collections/netapp/ontap/plugins/module_utils/netapp_module.py\", line 59, in cmp\nTypeError: '>' not supported between instances of 'str' and 'bool'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/home/users/myuser/.ansible/tmp/ansible-tmp-1654057515.9916222-72543-99218988876789/AnsiballZ_na_ontap_autosupport.py\", line 100, in <module>\n _ansiballz_main()\n File \"/home/users/myuser/.ansible/tmp/ansible-tmp-1654057515.9916222-72543-99218988876789/AnsiballZ_na_ontap_autosupport.py\", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/users/myuser/.ansible/tmp/ansible-tmp-1654057515.9916222-72543-99218988876789/AnsiballZ_na_ontap_autosupport.py\", line 41, in invoke_module\n run_name='__main__', alter_sys=True)\n File \"/opt/rh/rh-python36/root/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/opt/rh/rh-python36/root/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/opt/rh/rh-python36/root/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_na_ontap_autosupport_payload_qxep8z7y/ansible_na_ontap_autosupport_payload.zip/ansible_collections/netapp/ontap/plugins/modules/na_ontap_autosupport.py\", line 456, in <module>\n File \"/tmp/ansible_na_ontap_autosupport_payload_qxep8z7y/ansible_na_ontap_autosupport_payload.zip/ansible_collections/netapp/ontap/plugins/modules/na_ontap_autosupport.py\", line 452, in main\n File \"/tmp/ansible_na_ontap_autosupport_payload_qxep8z7y/ansible_na_ontap_autosupport_payload.zip/ansible_collections/netapp/ontap/plugins/modules/na_ontap_autosupport.py\", line 442, in apply\n File \"/tmp/ansible_na_ontap_autosupport_payload_qxep8z7y/ansible_na_ontap_autosupport_payload.zip/ansible_collections/netapp/ontap/plugins/module_utils/netapp_module.py\", line 294, in get_modified_attributes\nTypeError: TypeError(\"'>' not supported between instances of 'str' and 'bool'\",), key: support, value: 'enable', desired: True\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
Summary
When trying to enable support on a recent OnTAP 9.11 node, I get a TypeError from get_modified_attributes in plugins/module_utils/netapp_module.py TypeError: TypeError("'>' not supported between instances of 'str' and 'bool'",), key: support, value: 'enable', desired: True
Component Name
na_ontap_autosupport
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Expected Results
On an older version of ONTAP I would expect this to return a SUCCESS or CHANGED, and the command to return the current state of configuration. However, on ONTAP 9.11.1 it seems that the support current value is returned as a string 'enable', and not interpreted as boolean 'True'. This probably stems from ONTAP changing the way they return this value now.
Actual Results