Ansible issue - Upgraded to pc2004.1 and ntnx_categories_info returns 401

  • 30 May 2024
  • 1 reply


My team have just upgraded our lab to pc2004.1 and my Ansible role to retrieve category information has stopped working…  It now returns:

ok: [localhost] => 
changed: false
error: 'HTTP Error 401: UNAUTHORIZED'
failed: true
msg: 'Failed fetching URL: https://gbh-pcs-l01.fqdn:9440/api/nutanix/v3/categories/list'
response: null
status_code: 401

the play used is as simple as it gets:

- name: test getting all categories
nutanix_host: "{{ prism_url }}"
nutanix_username: "{{ prism_user }}"
nutanix_password: "{{ prism_password }}"
validate_certs: false
register: result
ignore_errors: true
- debug:
var: result

it worked on our old version, and my equivalent ‘get_subnet_info’ and ‘get_vm_info’  still work fine, so I’m leaning towards a change in permissions for Categories in pc2004.1?

The team has tried randomly applying permissions to the account used without luck.  Any thoughts gratefully received! 

This topic has been closed for comments

1 reply

Never mind! It does work.

User account formatting issues!  The difference between domain\user (works with esxi) and user@domain (works with PC) - the dangers of moving between systems!