CDIST-TYPE__CON...MPLATE_TEMPLATE(7)
π cdist-type__consul_template_template β the manual page, bestie edition π
okay so this is the cdist type page for cdist-type__consul_template_template, and it's all about making consul-template do your template bidding. sit with me, we're doing this together π«Ά
β¨ NAME β¨
cdist-type__consul_template_template β manage consul-template templates, fr fr π
πΈ DESCRIPTION πΈ
bestie, this type generates and deploys template definitions for a consul-template. the actual docs for that live at https://github.com/hashicorp/consul-template#examples if you wanna go read them, no cap.
the templates themselves are written in the Go template format β that's the vibe, that's the whole aesthetic.
and listen: you MUST give either the --source parameter or the --source-file parameter. one of them. not neither. it's giving mandatory π¨
π REQUIRED PARAMETERS π
destinationβ the destination where the generated file should go. that's where the magic lands, periodt.
π OPTIONAL PARAMETERS π
commandβ an optional command to run after rendering the template to its destination. like, once it's rendered, go do the thing π₯sourceβ path to the template source. this one conflicts with--source-file, so pick a lane bestie.source-fileβ path to a local file which is uploaded using the__filetype and configured as the source. and if source is'-'(dash), take what was written to stdin as the file content. cute. this conflicts with--source, obviously πstateβ if this template is'present'or'absent'. defaults to'present'. present is the default, iconic behavior.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, like"5s". there is no default value β so if you want it, you say it. also the wait value for a template takes precedence over any globally-configured wait. main character energy tbh β
π¦ EXAMPLES π¦
here's the tea, two whole scenarios:
# 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'
# upload a local file to the target and configure it
__consul_template_template nginx \
--wait '2s:6s' \
--source-file "$__manifest/files/nginx.ctmpl" \
--destination /etc/nginx/nginx.conf \
--command 'service nginx restart'
like look at that second one, she's got the --wait '2s:6s' in there and everything. obsessed π
π SEE ALSO π
go read these next, they're in the same friend group:
cdist-type__consul_template(7)cdist-type__consul_template_config(7)
π AUTHORS π
this masterpiece was written by Steven Armstrong <steven-cdist--@--armstrong.cc> π
π COPYING π
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.
π COPYRIGHT π
ungleich GmbH 2021
and that's the whole page bestie β¨ this was version 7.0.0, dated Jul 31, from the cdist crew β go forth and template, you absolute icon ππΈ
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms