#Unable to add NLF with na_ontap_license

1 messages · Page 1 of 1 (latest)

fallow sapphire
#

I get the following error when trying to add a NLF using the na_ontap_license module.

TASK [cluster_config : ONTAP Licences - NLF Licence Files] ************************************************************************************************************************************************************************************************* [WARNING]: The license will be installed without checking for idempotency. You are seeing this warning because the license contents cannot be read. Unable to decode input: {"statusResp":{"statusCode":"SUCCESS" - exception: Expecting ',' delimiter: line 1 column 38 (char 37). failed: [LABA220] (item={'nlf_filepath': '/tmp/licences/node_a.txt'}) => {"ansible_loop_var": "item", "changed": false, "item": {"nlf_filepath": "/tmp/licences/node_a.txt"}, "msg": "Error: cannot mix legacy licenses and NLF licenses; found 1 NLF licenses out of 45 license_codes."} failed: [LABA220] (item={'nlf_filepath': '/tmp/licences/node_b.txt'}) => {"ansible_loop_var": "item", "changed": false, "item": {"nlf_filepath": "/tmp/licences/node_b.txt"}, "msg": "Error: cannot mix legacy licenses and NLF licenses; found 1 NLF licenses out of 45 license_codes."}

Using legacy 28 character keys with the module works fine, but not when using the ONTAP ONE NLF file. I can do a CURL direct to /api/cluster/licenses after running "jq" on the NLF file and post'ing that. But the Ansible modules fails.

Has anyone come across this and know of a resolution?

fallen crest
#

- name: ..... add license file - {{ license_file }} netapp.ontap.na_ontap_license: state: present license_codes: - "{{ lookup('file', license_file) | string }}"

#

license_file is the full path/filename to the NLFv2 file. There's a lot of caveats for this module - NLF version 1 / NLF version 2, etc. Also needing the deepdiff module for idempotence. Review the 'Notes' section.