2015-02-24 12:10:17 +00:00
|
|
|
cdist-type__consul_template_template(7)
|
|
|
|
=======================================
|
2016-06-23 14:08:59 +00:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
cdist-type__consul_template_template - Manage consul-template templates
|
2015-02-24 12:10:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
Generate and deploy template definitions for a consul-template.
|
|
|
|
See https://github.com/hashicorp/consul-template#examples for documentation.
|
|
|
|
Templates are written in the Go template format.
|
|
|
|
Either the --source or the --source-file parameter must be given.
|
|
|
|
|
|
|
|
|
|
|
|
REQUIRED PARAMETERS
|
|
|
|
-------------------
|
2016-05-20 06:50:56 +00:00
|
|
|
destination
|
2015-02-24 12:10:17 +00:00
|
|
|
the destination where the generated file should go.
|
|
|
|
|
|
|
|
|
|
|
|
OPTIONAL PARAMETERS
|
|
|
|
-------------------
|
2016-05-20 06:50:56 +00:00
|
|
|
command
|
2015-02-24 12:10:17 +00:00
|
|
|
an optional command to run after rendering the template to its destination.
|
2016-05-20 06:50:56 +00:00
|
|
|
|
|
|
|
source
|
2015-02-24 12:10:17 +00:00
|
|
|
path to the template source. Conflicts --source-file.
|
2016-05-20 06:50:56 +00:00
|
|
|
|
|
|
|
source-file
|
2015-02-24 12:10:17 +00:00
|
|
|
path to a local file which is uploaded using the __file type and configured
|
|
|
|
as the source.
|
|
|
|
If source is '-' (dash), take what was written to stdin as the file content.
|
|
|
|
Conflicts --source.
|
2016-05-20 06:50:56 +00:00
|
|
|
|
|
|
|
state
|
2015-02-24 12:10:17 +00:00
|
|
|
if this template is 'present' or 'absent'. Defaults to 'present'.
|
|
|
|
|
2016-06-22 21:57:25 +00:00
|
|
|
wait
|
|
|
|
The `minimum(:maximum)` time to wait before rendering a new template to
|
|
|
|
disk and triggering a command, separated by a colon (`:`). If the optional
|
|
|
|
maximum value is omitted, it is assumed to be 4x the required minimum value.
|
|
|
|
This is a numeric time with a unit suffix ("5s"). There is no default value.
|
|
|
|
The wait value for a template takes precedence over any globally-configured
|
|
|
|
wait.
|
|
|
|
|
2015-02-24 12:10:17 +00:00
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
--------
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. code-block:: sh
|
|
|
|
|
|
|
|
# configure template on the target
|
|
|
|
__consul_template_template nginx \
|
|
|
|
--source /etc/my-consul-templates/nginx.ctmpl \
|
|
|
|
--destination /etc/nginx/nginx.conf \
|
|
|
|
--command 'service nginx restart'
|
2015-02-24 12:10:17 +00:00
|
|
|
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
# upload a local file to the target and configure it
|
|
|
|
__consul_template_template nginx \
|
2016-06-22 21:57:25 +00:00
|
|
|
--wait '2s:6s' \
|
2016-05-20 06:50:56 +00:00
|
|
|
--source-file "$__manifest/files/nginx.ctmpl" \
|
|
|
|
--destination /etc/nginx/nginx.conf \
|
|
|
|
--command 'service nginx restart'
|
2015-02-24 12:10:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
2016-06-30 13:12:32 +00:00
|
|
|
:strong:`cdist-type__consul_template`\ (7), :strong:`cdist-type__consul_template_config`\ (7)
|
2016-06-17 19:28:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
AUTHORS
|
|
|
|
-------
|
|
|
|
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
2015-02-24 12:10:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
COPYING
|
|
|
|
-------
|
2016-08-10 16:15:54 +00:00
|
|
|
Copyright \(C) 2015-2016 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.
|