ONTAP Discussions

Getting "User is not authorized." for any ansible module tried

Mickos
239 Views
Hello,
We are using ONTAP Version 9.16.1P9.
When we try any Ansible tasks, example: 
- name: Gather information test
  netapp.ontap.na_ontap_rest_info:
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
    validate_certs: false
    gather_subset:
      - storage/qtrees
  register: qtrees_info
We are getting this error:
"msg": {
    "code": "6691623",
    "message": "User is not authorized."
},
However:
  • The ONTAP user is configured with the default vsadmin role (traditional role).
  • A direct REST call using the same credentials (for example GET /api/storage/qtrees) works correctly outside of Ansible.
  • The 401 Unauthorized (code 6691623) error occurs only when using the Ansible modules (na_ontap_rest_info, na_ontap_qtree).
  • Password has been vaulted with and without new line at the end.

Account is set like this:

                                                                 Second
User/Group                 Authentication                 Acct   Authentication
Name           Application Method        Role Name        Locked Method
-------------- ----------- ------------- ---------------- ------ --------------
vsadmin        http        password      vsadmin          no     none
vsadmin        ontapi      password      vsadmin          no     none
vsadmin        ssh         password      noaccess         no     none
3 entries were displayed.​
Does someone have an idea?
Thanks in advance,
0 REPLIES 0
Public