PARALLAX

consul_auth_method

Manipulate Consul auth methods

Collection: community.general

Full Name: community.general.consul_auth_method

Synopsis

Manipulate Consul auth methods

Parameters

NameTypeRequiredDefaultDescription
ca_pathstringTarget PEM CA bundle path.
configdictThe raw configuration to use for the chosen auth method. Contents vary depending upon the O(type) chosen. Required when the auth method is created.
descriptionstringFree form human readable description of the auth method.
display_namestringAn optional name to use instead of O(name) when displaying information about this auth method.
hoststringlocalhostConsul agent hostname.
max_token_ttlstringThis 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).
namestringyesSpecifies a name for the ACL auth method. The name can contain alphanumeric characters, dashes C(-), and underscores C(_).
portint8500Consul agent HTTP port.
schemestringhttpHTTP or HTTPS protocol.
statestringpresentWhether the token should be present or absent.
tokenstringConsul ACL token; private argument.
token_localitystringDefines the kind of token that this auth method should produce.
typestringThe type of auth method being configured. This field is immutable. Required when the auth method is created.
validate_certsbooltrueValidate 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
Search
    ↑ ↓ move↵ openesc close