## cdist-type__consul_template_template(7)

### Steven Armstrong

`<steven-cdist--@--armstrong.cc>`

## 1. NAME

cdist-type__consul_template_template - manage consul-template templates

## 2. 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.

## 3. REQUIRED PARAMETERS

destination
  the destination where the generated file should go.

## 4. OPTIONAL PARAMETERS

command
  an optional command to run after rendering the template to its destination.
source
  path to the template source. Conflicts --source-file.
source-file
  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.
state
  if this template is present or absent. Defaults to present.

## 5. EXAMPLES

    # 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 \
       --source-file "$__manifest/files/nginx.ctmpl" \
       --destination /etc/nginx/nginx.conf \
       --command 'service nginx restart'

## 6. SEE ALSO

- cdist-type(7)
- cdist-type__consul_template(7)
- cdist-type__consul_template_config(7)

## 7. 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).