Skip to content

[Feat] Develop ansible module for ntnx_users_change_password_v2 #941

@abhinavbansal29

Description

@abhinavbansal29

Summary

Develop ntnx_users_change_password_v2 module to change local user passwords on Prism Central via IAM v4 API.

API: POST /iam/v4/authn/users/$actions/change-password
Docs: https://developers.nutanix.com/api-reference?namespace=iam&version=v4.1.b2#tag/Users/operation/changeUserPassword

Request Body (PasswordChangeRequest)

Field Type Description
username String (max 255) User identifier in email format
old_password String Current password
new_password String New password

Example

- name: Change password for local user
  nutanix.ncp.ntnx_users_change_password_v2:
    nutanix_host: "{{ pc_ip }}"
    nutanix_username: "{{ pc_username }}"
    nutanix_password: "{{ pc_password }}"
    validate_certs: false
    username: "user@example.com"
    old_password: "OldP@ssw0rd!"
    new_password: "NewP@ssw0rd!123"
  no_log: true

Todo

  • Client SDK (UsersApi.change_user_password())
  • Ansible spec & spec validator
  • no_log for password fields
  • Unit test, sanity test
  • Integration test
  • Documentation & examples

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions