drop support for <0.10.0
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
6fb35c7d90
commit
543d79a7b5
6 changed files with 68 additions and 12 deletions
|
@ -1 +0,0 @@
|
||||||
1356006333 8496656 consul-template
|
|
|
@ -1 +0,0 @@
|
||||||
https://github.com/hashicorp/consul-template/releases/download/v0.6.5/consul-template_0.6.5_linux_amd64.tar.gz
|
|
|
@ -1 +0,0 @@
|
||||||
4037434610 8901128 consul-template
|
|
|
@ -1 +0,0 @@
|
||||||
https://github.com/hashicorp/consul-template/releases/download/v0.9.0/consul-template_0.9.0_linux_amd64.tar.gz
|
|
|
@ -57,6 +57,15 @@ syslog-facility::
|
||||||
The default value is LOCAL0.
|
The default value is LOCAL0.
|
||||||
token::
|
token::
|
||||||
the Consul API token.
|
the Consul API token.
|
||||||
|
vault-address::
|
||||||
|
the location of the Vault instance to query (may be an IP address or FQDN) with port.
|
||||||
|
vault-token::
|
||||||
|
the Vault API token.
|
||||||
|
vault-ssl-cert::
|
||||||
|
Path to an SSL client certificate to use to authenticate to the vault server.
|
||||||
|
vault-ssl-ca-cert::
|
||||||
|
Path to a CA certificate file, containing one or more CA certificates to
|
||||||
|
use to validate the certificate sent by the vault server to us.
|
||||||
version::
|
version::
|
||||||
which version of consul-template to install. See ./files/versions for a list of
|
which version of consul-template to install. See ./files/versions for a list of
|
||||||
supported versions. Defaults to the latest known version.
|
supported versions. Defaults to the latest known version.
|
||||||
|
@ -74,6 +83,10 @@ ssl-no-verify::
|
||||||
ignore certificate warnings. Only used if ssl is enabled.
|
ignore certificate warnings. Only used if ssl is enabled.
|
||||||
syslog::
|
syslog::
|
||||||
Send log output to syslog (in addition to stdout and stderr).
|
Send log output to syslog (in addition to stdout and stderr).
|
||||||
|
vault-ssl::
|
||||||
|
use HTTPS while talking to Vault. Requires the Vault server to be configured to serve secure connections.
|
||||||
|
vault-ssl-no-verify::
|
||||||
|
ignore certificate warnings. Only used if vault is enabled.
|
||||||
|
|
||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
|
|
|
@ -77,17 +77,64 @@ require="__directory/etc/consul-template" \
|
||||||
(
|
(
|
||||||
for param in $(ls "$__object/parameter/"); do
|
for param in $(ls "$__object/parameter/"); do
|
||||||
case "$param" in
|
case "$param" in
|
||||||
ssl|ssl-no-verify) # boolean
|
auth-password|state|ssl-*|syslog-*|version|vault-token|vault-ssl*) continue ;;
|
||||||
key="$(echo "$param" | tr '-' '_')"
|
auth-username)
|
||||||
printf '%s = true\n' "$key"
|
printf 'auth {\n'
|
||||||
|
printf ' enabled = true\n'
|
||||||
|
printf ' username = "%s"\n' "$(cat "$__object/parameter/auth-username")"
|
||||||
|
if [ -f "$__object/parameter/auth-password" ]; then
|
||||||
|
printf ' password = %s\n' "$(cat "$__object/parameter/auth-password")"
|
||||||
|
fi
|
||||||
|
printf '}\n'
|
||||||
;;
|
;;
|
||||||
auth|batch-size|consul|max-stale|retry|token|wait)
|
ssl)
|
||||||
key="$(echo "$param" | tr '-' '_')"
|
printf 'ssl {\n'
|
||||||
printf '%s = "%s"\n' "$key" "$(cat "$__object/parameter/$param")"
|
printf ' enabled = true\n'
|
||||||
|
if [ -f "$__object/parameter/ssl-no-verify" ]; then
|
||||||
|
printf ' verify = false\n'
|
||||||
|
fi
|
||||||
|
if [ -f "$__object/parameter/ssl-cert" ]; then
|
||||||
|
printf ' cert = "%s"\n' "$(cat "$__object/parameter/ssl-cert")"
|
||||||
|
fi
|
||||||
|
if [ -f "$__object/parameter/ssl-ca-cert" ]; then
|
||||||
|
printf ' ca_cert = "%s"\n' "$(cat "$__object/parameter/ssl-ca-cert")"
|
||||||
|
fi
|
||||||
|
printf '}\n'
|
||||||
|
;;
|
||||||
|
syslog)
|
||||||
|
printf 'syslog {\n'
|
||||||
|
printf ' enabled = true\n'
|
||||||
|
if [ -f "$__object/parameter/syslog-facility" ]; then
|
||||||
|
printf ' facility = "%s"\n' "$(cat "$__object/parameter/syslog-facility")"
|
||||||
|
fi
|
||||||
|
printf '}\n'
|
||||||
|
;;
|
||||||
|
vault-address)
|
||||||
|
printf 'vault {\n'
|
||||||
|
printf ' address = "%s"\n' "$(cat "$__object/parameter/vault-address")"
|
||||||
|
if [ -f "$__object/parameter/vault-token" ]; then
|
||||||
|
printf ' token = "%s"\n' "$(cat "$__object/parameter/vault-token")"
|
||||||
|
fi
|
||||||
|
if [ -f "$__object/parameter/vault-ssl" ]; then
|
||||||
|
printf ' ssl {\n'
|
||||||
|
printf ' enabled = true\n'
|
||||||
|
if [ -f "$__object/parameter/vault-ssl-no-verify" ]; then
|
||||||
|
printf ' verify = false\n'
|
||||||
|
fi
|
||||||
|
if [ -f "$__object/parameter/vault-ssl-cert" ]; then
|
||||||
|
printf ' cert = "%s"\n' "$(cat "$__object/parameter/vault-ssl-cert")"
|
||||||
|
fi
|
||||||
|
if [ -f "$__object/parameter/vault-ssl-ca-cert" ]; then
|
||||||
|
printf ' ca_cert = "%s"\n' "$(cat "$__object/parameter/vault-ssl-ca-cert")"
|
||||||
|
fi
|
||||||
|
printf ' }\n'
|
||||||
|
fi
|
||||||
|
printf '}\n'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# ignore unknown parameters
|
# string key=value parameters
|
||||||
:
|
key="$(echo "$param" | tr '-' '_')"
|
||||||
|
printf '%s = "%s"\n' "$key" "$(cat "$__object/parameter/$param")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue