consul_auth_method
Manipulate Consul auth methods
Collection: community.general
Full Name: community.general.consul_auth_method
Synopsis
Manipulate Consul auth methods
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| ca_path | string | Target PEM CA bundle path. | ||
| config | dict | The raw configuration to use for the chosen auth method. Contents vary depending upon the O(type) chosen. Required when the auth method is created. | ||
| description | string | Free form human readable description of the auth method. | ||
| display_name | string | An optional name to use instead of O(name) when displaying information about this auth method. | ||
| host | string | localhost | Consul agent hostname. | |
| max_token_ttl | string | This specifies the maximum life of any token created by this auth method. Can be specified in the form of V(60s) or V(5m) (that is, 60 seconds or 5 minutes, respectively). | ||
| name | string | yes | Specifies a name for the ACL auth method. The name can contain alphanumeric characters, dashes C(-), and underscores C(_). | |
| port | int | 8500 | Consul agent HTTP port. | |
| scheme | string | http | HTTP or HTTPS protocol. | |
| state | string | present | Whether the token should be present or absent. | |
| token | string | Consul ACL token; private argument. | ||
| token_locality | string | Defines the kind of token that this auth method should produce. | ||
| type | string | The type of auth method being configured. This field is immutable. Required when the auth method is created. | ||
| validate_certs | bool | true | Validate the server certificate. |
Example
yaml
- community.general.consul_auth_method:
config:
jwt_validation_pubkeys:
- |
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1SU1LfVLPHCozMxH2Mo
4lgOEePzNm0tRgeLezV6ffAt0gunVTLw7onLRnrq0/IzW7yWR7QkrmBL7jTKEn5u
+qKhbwKfBstIs+bMY2Zkp18gnTxKLxoS2tFczGkPLPgizskuemMghRniWaoLcyeh
kd3qqGElvW/VDL5AaWTg0nLVkjRo9z+40RQzuVaE8AkAFmxZzow3x+VJYKdjykkJ
0iT9wCS0DRTXu269V264Vf/3jvredZiKRkgwlL9xNAwxXFg0x/XFw005UWVRIkdg
cKWTjpBP2dPwVZ4WWC+9aGVd+Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbc
mwIDAQAB
-----END PUBLIC KEY-----
name: test
token: '{{ consul_management_token }}'
type: jwt
name: Create an auth method
- community.general.consul_auth_method:
name: test
state: absent
token: '{{ consul_management_token }}'
name: Delete auth method