1CDIST-TYPE__CONSUL_TEMPLATE_TEMPLATE(7c)diCsDtIST-TYPE__CONSUL_TEMPLATE_TEMPLATE(7)
2
3
4
6 cdist-type__consul_template_template - Manage consul-template templates
7
9 Generate and deploy template definitions for a consul-template. See
10 https://github.com/hashicorp/consul-template#examples for documenta‐
11 tion. Templates are written in the Go template format. Either the
12 --source or the --source-file parameter must be given.
13
15 destination
16 the destination where the generated file should go.
17
19 command
20 an optional command to run after rendering the template to its
21 destination.
22
23 source path to the template source. Conflicts --source-file.
24
25 source-file
26 path to a local file which is uploaded using the __file type and
27 configured as the source. If source is '-' (dash), take what
28 was written to stdin as the file content. Conflicts --source.
29
30 state if this template is 'present' or 'absent'. Defaults to
31 'present'.
32
33 wait The minimum(:maximum) time to wait before rendering a new tem‐
34 plate to disk and triggering a command, separated by a colon
35 (:). If the optional maximum value is omitted, it is assumed to
36 be 4x the required minimum value. This is a numeric time with a
37 unit suffix ("5s"). There is no default value. The wait value
38 for a template takes precedence over any globally-configured
39 wait.
40
42 # configure template on the target
43 __consul_template_template nginx \
44 --source /etc/my-consul-templates/nginx.ctmpl \
45 --destination /etc/nginx/nginx.conf \
46 --command 'service nginx restart'
47
48
49 # upload a local file to the target and configure it
50 __consul_template_template nginx \
51 --wait '2s:6s' \
52 --source-file "$__manifest/files/nginx.ctmpl" \
53 --destination /etc/nginx/nginx.conf \
54 --command 'service nginx restart'
55
57 cdist-type__consul_template(7), cdist-type__consul_template_config(7)
58
60 Steven Armstrong <steven-cdist--@--armstrong.cc>
61
63 Copyright (C) 2015-2016 Steven Armstrong. You can redistribute it
64 and/or modify it under the terms of the GNU General Public License as
65 published by the Free Software Foundation, either version 3 of the
66 License, or (at your option) any later version.
67
69 ungleich GmbH 2020
70
71
72
73
746.9.4 Dec 21,CD2I0S2T0-TYPE__CONSUL_TEMPLATE_TEMPLATE(7)