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'.
|
|
|
|
|
|
|
|
|
|
|
|
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 \
|
|
|
|
--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-17 19:28:16 +00:00
|
|
|
`cdist-type__consul_template(7) <cdist-type__consul_template.html>`_,
|
|
|
|
`cdist-type__consul_template_config(7) <cdist-type__consul_template_config.html>`_
|
|
|
|
|
|
|
|
Full documentation at: <:cdist_docs:`index`>,
|
|
|
|
especially cdist type chapter: <:cdist_docs:`cdist-type`>.
|
|
|
|
|
|
|
|
|
|
|
|
AUTHORS
|
|
|
|
-------
|
|
|
|
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
2015-02-24 12:10:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
COPYING
|
|
|
|
-------
|
|
|
|
Copyright \(C) 2015 Steven Armstrong. Free use of this software is
|
|
|
|
granted under the terms of the GNU General Public License version 3 (GPLv3).
|