community.general.proxmox_user_info module – Retrieve information about one or more Proxmox VE users
Note
This module is part of the community.general collection (version 4.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.proxmox_user_info
.
New in version 1.3.0: of community.general
Requirements
The below requirements are needed on the host that executes this module.
proxmoxer
requests
Parameters
Parameter |
Comments |
---|---|
Specify the target host of the Proxmox VE cluster. |
|
Specify the password to authenticate with. You can use |
|
Specify the token ID. |
|
Specify the token secret. |
|
Specify the user to authenticate with. |
|
Restrict results to a specific authentication realm. |
|
Restrict results to a specific user. |
|
Restrict results to a specific user ID, which is a concatenation of a user and domain parts. |
|
If This should only be used on personally controlled sites using self-signed certificates. Choices:
|
Examples
- name: List existing users
community.general.proxmox_user_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
register: proxmox_users
- name: List existing users in the pve authentication realm
community.general.proxmox_user_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
domain: pve
register: proxmox_users_pve
- name: Retrieve information about admin@pve
community.general.proxmox_user_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
userid: admin@pve
register: proxmox_user_admin
- name: Alternative way to retrieve information about admin@pve
community.general.proxmox_user_info:
api_host: helldorado
api_user: root@pam
api_password: "{{ password | default(omit) }}"
api_token_id: "{{ token_id | default(omit) }}"
api_token_secret: "{{ token_secret | default(omit) }}"
user: admin
domain: pve
register: proxmox_user_admin
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
List of users. Returned: always, but can be empty |
|
Short description of the user. Returned: on success |
|
User’s authentication realm, also the right part of the user ID. Returned: on success |
|
User’s email address. Returned: on success |
|
User’s account state. Returned: on success |
|
Expiration date in seconds since EPOCH. Zero means no expiration. Returned: on success |
|
User’s first name. Returned: on success |
|
List of groups which the user is a member of. Returned: on success |
|
User’s two factor authentication keys. Returned: on success |
|
User’s last name. Returned: on success |
|
List of API tokens associated to the user. Returned: on success |
|
Short description of the token. Returned: on success |
|
Expiration date in seconds since EPOCH. Zero means no expiration. Returned: on success |
|
Describe if the API token is further restricted with ACLs or is fully privileged. Returned: on success |
|
Token name. Returned: on success |
|
User’s login name, also the left part of the user ID. Returned: on success |
|
Proxmox user ID, represented as user@realm. Returned: on success |
Authors
Tristan Le Guern (@tleguern)
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication