#Unable to install certificate with ansible

1 messages · Page 1 of 1 (latest)

safe vortex
#

Hi, I'm trying to install a certificate into a VServer with the Ansible module na_ontap_security_certificates. Unfortunately, I get the error: "User is not authorized."

The user with whom the playbook is executed has the admin role at the cluster level. Previously, the Vserver and the interfaces were already installed with it. In general, there are no authorization problems with the user.

Any ideas why I get the error: "User is not authorized."

safe vortex
#

It also doesn't work with the native admin user.
Does the module have a general problem with this task?

#

Thats the args from the module call:

fatal: [netappcluster]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"cert_filepath": "files/certs/file.cert.pem",
"common_name": "testname.com",
"expiry_time": null,
"feature_flags": null,
"force_ontap_version": null,
"hash_function": null,
"hostname": "testhost",
"http_port": null,
"https": true,
"ignore_name_if_not_supported": true,
"intermediate_certificates": null,
"key_filepath": "files/certs/file.key.pem",
"key_size": null,
"name": "testname.com",
"ontapi": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"private_key": null,
"public_certificate": null,
"signing_request": null,
"state": "present",
"svm": "vs5901",
"type": "server",
"use_rest": "auto",
"username": "ansibleuser",
"validate_certs": false
}
},
"msg": "User is not authorized."
}

glacial plover
#

You are holding it wrong. 🙂 cert_filepath and key_filepath are used for certificate authentication. So the module is trying to login with the cert, that's why you get the error.

#

Try this: