dubzland.vault.vault_auth_method module – Manages HashiCorp Vault authentication methods
Note
This module is part of the dubzland.vault collection (version 1.0.1).
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 dubzland.vault
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dubzland.vault.vault_auth_method
.
Synopsis
When the auth method does not exist, it will be created.
When the auth method does exist and
state=absent
, the auth method will be deleted.When changes are made to the auth method, the auth method will be updated.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.8
hvac >= 7.1.4
Parameters
Parameter |
Comments |
---|---|
Authentication method to be used. Choices:
|
|
The AWS access key to use. |
|
If specified, sets the value to use for the |
|
The AWS profile |
|
The AWS secret key that corresponds to the access key. |
|
The AWS security token if using temporary access and secret keys. |
|
The client ID (also known as application ID) of the Azure AD service principal or managed identity. Should be a UUID. If not specified, will use the system assigned managed identity. |
|
The client secret of the Azure AD service principal. |
|
The resource URL for the application registered in Azure Active Directory. Usually should not be changed from the default. Default: |
|
The Azure Active Directory Tenant ID (also known as the Directory ID) of the service principal. Should be a UUID. Required when using a service principal to authenticate to Vault, e.g. required when both azure_client_id and azure_client_secret are specified. Optional when using managed identity to authenticate to Vault. |
|
For |
|
For |
|
Configuration provided to the authentication method. |
|
List of headers to allow, allowing a plugin to include them in the response. |
|
List of keys that will not be HMAC’d by audit devices in the request data object. |
|
List of keys that will not be HMAC’d by audit devices in the response data object. |
|
The default lease duration, specified as a string duration like “5s” or “30m”. |
|
The key to use for signing plugin workload identity tokens. If not provided, this will default to Vault’s OIDC default key. |
|
Specifies whether to show this mount in the UI-specific listing endpoint. Valid values are “unauth” or “hidden”, with the default “” being equivalent to “hidden”. |
|
The maximum lease duration, specified as a string duration like “5s” or “30m”. |
|
List of headers to allow and pass from the request to the plugin. |
|
Specifies the semantic version of the plugin to use, e.g. “v1.0.0”. If unspecified, the server will select any matching unversioned plugin that may have been registered, the latest versioned plugin registered, or a built-in plugin in that order of precedence. |
|
Human readable description for the authentication method. |
|
The JSON Web Token (JWT) to use for JWT authentication to Vault. |
|
Type of authentication method to be created Choices:
|
|
Vault mount point. If not specified, the default mount point for a given auth method is used. Does not apply to token authentication. |
|
Authentication password. |
|
Path to the authentication method to be enabled. |
|
The AWS region for which to create the connection. |
|
Vault Role ID or name. Used in For For |
|
Secret ID to be used for Vault AppRole authentication. |
|
Indicates the desired authentication method state.
Choices:
|
|
Vault token. Token may be specified explicitly, through the listed [env] vars, and also through the If no token is supplied, explicitly or through env, then the plugin will check for a token file, as determined by token_path and token_file. The order of token loading (first found wins) is |
|
If no token is specified, will try to read the token from this file in token_path. Default: |
|
If no token is specified, will try to read the token_filename from this path. |
|
For token auth, will perform a Disable if your token does not have the Choices:
|
|
The resolvable endpoint for the Vault API. |
|
Authentication user name. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target. |
|
Support: none |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode. |
Examples
- name: Enable AppRole authentication
dubzland.vault.vault_auth_method:
method_type: approle
description: AppRole authentication
state: present
url: http://localhost:8200
token: "{{ _root_token }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Details about the authentication method Returned: success |