forked from ungleich-public/cdist
add new --wait parameter for consul-template
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
75b32328b6
commit
6944998a19
3 changed files with 12 additions and 2 deletions
|
@ -36,6 +36,14 @@ source-file
|
||||||
state
|
state
|
||||||
if this template is 'present' or 'absent'. Defaults to 'present'.
|
if this template is 'present' or 'absent'. Defaults to 'present'.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
--------
|
--------
|
||||||
|
@ -51,6 +59,7 @@ EXAMPLES
|
||||||
|
|
||||||
# upload a local file to the target and configure it
|
# upload a local file to the target and configure it
|
||||||
__consul_template_template nginx \
|
__consul_template_template nginx \
|
||||||
|
--wait '2s:6s' \
|
||||||
--source-file "$__manifest/files/nginx.ctmpl" \
|
--source-file "$__manifest/files/nginx.ctmpl" \
|
||||||
--destination /etc/nginx/nginx.conf \
|
--destination /etc/nginx/nginx.conf \
|
||||||
--command 'service nginx restart'
|
--command 'service nginx restart'
|
||||||
|
@ -65,5 +74,5 @@ SEE ALSO
|
||||||
|
|
||||||
COPYING
|
COPYING
|
||||||
-------
|
-------
|
||||||
Copyright \(C) 2015 Steven Armstrong. Free use of this software is
|
Copyright \(C) 2015-2016 Steven Armstrong. Free use of this software is
|
||||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
||||||
|
|
|
@ -55,7 +55,7 @@ for param in $(ls "$__object/parameter/"); do
|
||||||
printf ' source = "%s"\n' "$destination"
|
printf ' source = "%s"\n' "$destination"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
source|destination|command)
|
source|destination|command|wait)
|
||||||
printf ' %s = "%s"\n' "$param" "$(cat "$__object/parameter/$param")"
|
printf ' %s = "%s"\n' "$param" "$(cat "$__object/parameter/$param")"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -2,3 +2,4 @@ command
|
||||||
source
|
source
|
||||||
source-file
|
source-file
|
||||||
state
|
state
|
||||||
|
wait
|
||||||
|
|
Loading…
Reference in a new issue