community.general.nomad_token module – Manage Nomad ACL tokens
Note
This module is part of the community.general collection (version 8.6.8).
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.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.nomad_token
.
New in community.general 8.1.0
Synopsis
This module allows to create Bootstrap tokens, create ACL tokens, update ACL tokens, and delete ACL tokens.
Requirements
The below requirements are needed on the host that executes this module.
python-nomad
Parameters
Parameter |
Comments |
---|---|
Path of certificate for TLS/SSL. |
|
Path of certificate’s private key for TLS/SSL. |
|
Indicates whether or not the token was created with the Choices:
|
|
FQDN of Nomad server. |
|
Name of ACL token to create. |
|
Namespace for Nomad. |
|
A list of the policies assigned to the token. Default: |
|
Port of Nomad server. Default: |
|
Create or remove ACL token. Choices:
|
|
Timeout (in seconds) for the request to Nomad. Default: |
|
ACL token for authentication. |
|
The type of the token can be Choices:
|
|
Use TLS/SSL connection. Choices:
|
|
Enable TLS/SSL certificate validation. Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
See Also
See also
- Nomad ACL documentation
Complete documentation for Nomad API ACL.
Examples
- name: Create boostrap token
community.general.nomad_token:
host: localhost
token_type: bootstrap
state: present
- name: Create ACL token
community.general.nomad_token:
host: localhost
name: "Dev token"
token_type: client
policies:
- readonly
global_replicated: false
state: absent
- name: Update ACL token Dev token
community.general.nomad_token:
host: localhost
name: "Dev token"
token_type: client
policies:
- readonly
- devpolicy
global_replicated: false
state: absent
- name: Delete ACL token
community.general.nomad_token:
host: localhost
name: "Dev token"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Result returned by nomad. Returned: always Sample: |