community / community.general / 2.5.9 / module / proxmox_user_info Retrieve information about one or more Proxmox VE users | "added in version" 1.3.0 of community.general" Authors: Tristan Le Guern (@tleguern)community.general.proxmox_user_info (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Retrieve information about one or more Proxmox VE users
- 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
user: aliases: - name description: - Restrict results to a specific user. type: str domain: aliases: - realm description: - Restrict results to a specific authentication realm. type: str userid: description: - Restrict results to a specific user ID, which is a concatenation of a user and domain parts. type: str api_host: description: - Specify the target host of the Proxmox VE cluster. required: true type: str api_user: description: - Specify the user to authenticate with. required: true type: str api_password: description: - Specify the password to authenticate with. - You can use C(PROXMOX_PASSWORD) environment variable. type: str api_token_id: description: - Specify the token ID. type: str version_added: 1.3.0 version_added_collection: community.general validate_certs: default: false description: - If C(no), SSL certificates will not be validated. - This should only be used on personally controlled sites using self-signed certificates. type: bool api_token_secret: description: - Specify the token secret. type: str version_added: 1.3.0 version_added_collection: community.general
proxmox_users: contains: comment: description: Short description of the user. returned: on success type: str domain: description: User's authentication realm, also the right part of the user ID. returned: on success type: str email: description: User's email address. returned: on success type: str enabled: description: User's account state. returned: on success type: bool expire: description: Expiration date in seconds since EPOCH. Zero means no expiration. returned: on success type: int firstname: description: User's first name. returned: on success type: str groups: description: List of groups which the user is a member of. elements: str returned: on success type: list keys: description: User's two factor authentication keys. returned: on success type: str lastname: description: User's last name. returned: on success type: str tokens: contains: comment: description: Short description of the token. returned: on success type: str expire: description: Expiration date in seconds since EPOCH. Zero means no expiration. returned: on success type: int privsep: description: Describe if the API token is further restricted with ACLs or is fully privileged. returned: on success type: bool tokenid: description: Token name. returned: on success type: str description: List of API tokens associated to the user. elements: dict returned: on success type: list user: description: User's login name, also the left part of the user ID. returned: on success type: str userid: description: Proxmox user ID, represented as user@realm. returned: on success type: str description: List of users. elements: dict returned: always, but can be empty type: list