community.proxmox.proxmox_domain module – Manage authentication realms.
Note
This module is part of the community.proxmox collection (version 2.0.0).
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.proxmox.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.proxmox.proxmox_domain.
New in community.proxmox 2.0.0
Synopsis
Add, modify or delete domain authentication realms.
Requirements
The below requirements are needed on the host that executes this module.
proxmoxer >= 2.3
requests
Parameters
Parameter |
Comments |
|---|---|
AD domain name. Required when |
|
Specify the target host of the Proxmox VE cluster. Uses the |
|
Specify the OTP. Uses the |
|
Specify the password to authenticate with. Uses the |
|
Specify the target port of the Proxmox VE cluster. Uses the |
|
Time limit for requests towards the Proxmox VE API. Default: |
|
Specify the token ID. Uses the |
|
Specify the token secret. Uses the |
|
Specify the user to authenticate with. Uses the |
|
Path to a local certificate, which will be used to verify TLS connections. Ignored if |
|
Description of the realm. |
|
Use as default realm. Choices:
|
|
LDAP base domain name. Required when |
|
Enable creation of new users. Choices:
|
|
Semicolon-separated list of things to remove when they or the user vanishes during a sync. The following values are possible
Instead of a list it also can be Example |
|
Select what to sync. Choices:
|
|
LDAP user attribute name. Required when |
|
Defines the Authentication Context Class Reference values requested from the Authorization Server for the Authentication Request. Supported for |
|
OpenID Client ID. Required when |
|
OpenID Client key. Supported for |
|
OpenID claim used to retrieve groups with. Supported for |
|
All groups will be overwritten for the user on login. Supported for Choices:
|
|
OpenID Issuer Url. Required when |
|
Specifies whether the Authorization Server prompts the End-User for reauthentication and consent. Supported for with |
|
Enables querying the userinfo endpoint for claims values. Supported for with Choices:
|
|
Specifies the scopes (user details) that should be authorized and returned, for example ‘email’ or ‘profile’. Supported for |
|
OpenID claim used to generate the unique username. Supported for |
|
Arbitrary string used to identify the login realm in Proxmox. |
|
Indicates if the realm should be present or absent. Choices:
|
|
Validate the TLS certificates used for the connection to the Proxmox VE API. May be set through the environment variable Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Action group: community.proxmox.proxmox |
Use |
|
Support: full This action does not modify state. |
Can run in |
|
Support: none This action does not modify state. |
Will return details on what has changed (or possibly needs changing in |
See Also
See also
- Authentication
Complete guide for the Proxmox API authentication
Examples
- name: Add LDAP domain
community.proxmox.proxmox_domain:
realm: "example.test"
state: present
type: "ldap"
default: True
ldap_base_dn: "cn=accounts,dc=example,dc=test"
ldap_bind_dn: "uid=sa-proxmox,cn=users,cn=accounts,dc=example,dc=test"
ldap_filter: "memberof=cn=admins-proxmox,cn=groups,cn=accounts,dc=example,dc=test"
ldap_group_filter: "cn=admins-proxmox"
ldap_group_name_attr: "cn"
ldap_mode: "ldaps"
ldap_password: XXXXX
ldap_primary_server: "ipa.example.test"
ldap_user_attr: "uid"
ldap_validate_certs: False
ldap_sync_defaults_options:
scope: "both"
enable_new: True
remove_vanished: "acl;properties;entry"
- name: Add AD domain
community.proxmox.proxmox_domain:
ad_domain: "ADDOMAIN"
realm: "ad"
state: present
type: "ad"
comment: "AD"
ad_mode: "ldap"
ad_password: XXXXXXXX
ad_primary_server: "ad.exemple.test"
ad_sync_defaults_options:
scope: "both"
enable_new: True
remove_vanished: "acl;properties;entry"
- name: Add OpenID domain
community.proxmox.proxmox_domain:
realm: "openid"
state: present
type: "openid"
openid_client_id: idoftheclient
openid_client_key: keyoftheclient
openid_issuer_url: "https://example.test/openid-server"
- name: Remove domain
community.proxmox.proxmox_domain:
realm: "ipa.example.test"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The output message that the module generates. Returned: always |