DOKK / manpages / debian 11 / cdist / cdist-type__consul_agent.7.en
CDIST-TYPE__CONSUL_AGENT(7) cdist CDIST-TYPE__CONSUL_AGENT(7)

cdist-type__consul_agent - Manage the consul agent

Configure and manage the consul agent.

None.

only used by servers. This designates the datacenter which is authoritative for ACL information.
either "allow" or "deny"; defaults to "allow". The default policy controls the behavior of a token when there is no matching rule.
either "allow", "deny" or "extend-cache"; "extend-cache" is the default.
only used for servers in the acl_datacenter. This token will be created with management-level permissions if it does not exist. It allows operators to bootstrap the ACL system with a token ID that is well-known.
when provided, the agent will use this token when making requests to the Consul servers.
used to control Time-To-Live caching of ACLs.
sets the bind address for cluster communication
sets server to expect bootstrap mode
path to a PEM encoded certificate authority file which will be uploaded and configure using the ca_file config option.
path to a PEM encoded certificate file which will be uploaded and configure using the cert_file config option.
sets the address to bind for client access
datacenter of the agent
provides the gossip encryption key
the primary group for the agent
path to a partial json config file without leading { and trailing }. If json-config is '-' (dash), take what was written to stdin as the file content.
path to a PEM encoded private key file which will be uploaded and configure using the key_file config option.
name of this node. Must be unique in the cluster
address to attempt joining every retry_interval until at least one join works. Can be specified multiple times.
the user to run the agent as
if the agent is 'present' or 'absent'. Defaults to 'present'. Currently state=absent is not working due to some dependency issues.

disables support for remote execution. When set to true, the agent will ignore any incoming remote exec requests.
disables automatic checking for security bulletins and new version releases
gracefully leave cluster on SIGTERM
rejoin the cluster using the previous state after leaving
used to control if an agent is in server or client mode
enables logging to syslog
enforce the use of TLS and verify a client's authenticity on incoming connections
enforce the use of TLS and verify the peers authenticity on outgoing connections
uses distribution package instead of upstream binary

# configure as server, bootstrap and rejoin
hostname="$(cat "$__global/explorer/hostname")"
__consul_agent \

--datacenter dc1 \
--node-name "${hostname%%.*}" \
--disable-update-check \
--server \
--rejoin-after-leave \
--bootstrap-expect 3 \
--retry-join consul-01 \
--retry-join consul-02 \
--retry-join consul-03 # configure as server, bootstrap and rejoin with ssl support hostname="$(cat "$__global/explorer/hostname")" __consul_agent \
--datacenter dc1 \
--node-name "${hostname%%.*}" \
--disable-update-check \
--server \
--rejoin-after-leave \
--bootstrap-expect 3 \
--retry-join consul-01 \
--retry-join consul-02 \
--retry-join consul-03 \
--ca-file-source /path/to/ca.pem \
--cert-file-source /path/to/cert.pem \
--key-file-source /path/to/key.pem \
--verify-incoming \
--verify-outgoing # configure as client and try joining existing cluster __consul_agent \
--datacenter dc1 \
--node-name "${hostname%%.*}" \
--disable-update-check \
--retry-join consul-01 \
--retry-join consul-02 \
--retry-join consul-03


consul documentation at: <http://www.consul.io/docs/agent/options.html>.

Steven Armstrong <steven-cdist--@--armstrong.cc>

Copyright (C) 2015 Steven Armstrong. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

ungleich GmbH 2020

February 7, 2021 6.9.4