keycloak_authentication_required_actions – Allows administration of Keycloak authentication required actions
Note
This module is part of the middleware_automation.keycloak collection.
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 middleware_automation.keycloak.
To use it in a playbook, specify: middleware_automation.keycloak.keycloak_authentication_required_actions.
New in middleware_automation.keycloak 3.0.0
Synopsis
This module can register, update and delete required actions.
It also filters out any duplicate required actions by their alias. The first occurrence is preserved.
Parameters
Parameter |
Comments |
|---|---|
OpenID Connect client_id to authenticate to the API with. Default: |
|
Client Secret to use in conjunction with auth_client_id (if required). |
|
URL to the Keycloak instance. |
|
Password to authenticate for API access with. |
|
Keycloak realm name to authenticate to for API access. |
|
Username to authenticate for API access with. |
|
Controls the HTTP connections timeout period (in seconds) to Keycloak API. Default: |
|
Configures the HTTP User-Agent header. Default: |
|
The name of the realm in which are the authentication required actions. |
|
Authentication refresh token for Keycloak API. |
|
Authentication required action. |
|
Unique name of the required action. |
|
Configuration for the required action. |
|
Indicates whether new users have the required action assigned to them. Choices:
|
|
Indicates, if the required action is enabled or not. Choices:
|
|
Displayed name of the required action. Required for registration. |
|
Priority of the required action. |
|
Provider ID of the required action. Required for registration. |
|
Control if the realm authentication required actions are going to be registered/updated ( Choices:
|
|
Authentication token for Keycloak API. |
|
Verify TLS certificates (do not disable this in production). Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Action group: middleware_automation.keycloak.keycloak added in middleware_automation.keycloak 3.0.0 |
Use |
|
Support: full |
Can run in |
|
Support: full |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Register a new required action.
middleware_automation.keycloak.keycloak_authentication_required_actions:
auth_client_id: "admin-cli"
auth_keycloak_url: "http://localhost:8080"
auth_password: "password"
auth_realm: "master"
auth_username: "admin"
realm: "master"
required_actions:
- alias: "TERMS_AND_CONDITIONS"
name: "Terms and conditions"
providerId: "TERMS_AND_CONDITIONS"
enabled: true
state: "present"
- name: Update the newly registered required action.
middleware_automation.keycloak.keycloak_authentication_required_actions:
auth_client_id: "admin-cli"
auth_keycloak_url: "http://localhost:8080"
auth_password: "password"
auth_realm: "master"
auth_username: "admin"
realm: "master"
required_actions:
- alias: "TERMS_AND_CONDITIONS"
enabled: false
state: "present"
- name: Delete the updated registered required action.
middleware_automation.keycloak.keycloak_authentication_required_actions:
auth_client_id: "admin-cli"
auth_keycloak_url: "http://localhost:8080"
auth_password: "password"
auth_realm: "master"
auth_username: "admin"
realm: "master"
required_actions:
- alias: "TERMS_AND_CONDITIONS"
state: "absent"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Representation of the authentication required actions after module execution. Returned: on success |
|
Unique name of the required action. Returned: success Sample: |
|
Configuration for the required action. Returned: success Sample: |
|
Indicates whether new users have the required action assigned to them. Returned: success Sample: |
|
Indicates, if the required action is enabled or not. Returned: success Sample: |
|
Displayed name of the required action. Required for registration. Returned: success Sample: |
|
Priority of the required action. Returned: success Sample: |
|
Provider ID of the required action. Required for registration. Returned: success Sample: |
|
Message as to what action was taken. Returned: always |