Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


consul-template (8) Versions 0.8.0

Installs/Configures consul-template

cookbook 'consul-template', '= 0.8.0', :supermarket
cookbook 'consul-template', '= 0.8.0'
knife supermarket install consul-template
knife supermarket download consul-template
Quality 0%


Latest Version
Build Status
Coverage Status

Installs and configures consul-template.

Supported Platforms

  • Ubuntu 14.04, 12.04
  • Debian 7.7, 6.0.10
  • Centos 6.5


  • node['consul_template']['base_url'] - Base URL for consul-template binary files
  • node['consul_template']['version'] - Version of consul-template to install. Used to determine which binary to grab from the base_url.
  • node['consul_template']['install_method'] - How consul-template should be installed. Supports 'binary' or 'source'.
  • 'node['consul_template']['install_dir'] - Directory where consul-template should be installed.
  • node['consul_template']['checksums'] - Contains a hash of checksums where the key is the file for a given OS/architecture, and the value is the associated checksum. For example, consul-template_0.3.1_linux_amd64.
  • node['consul_template']['source_revision'] - When installing from source, this determines the revision it should use.
  • node['consul_template']['config_dir'] - The directory that contains the configuration files for consul-template.
  • node['consul_template']['init_style'] - Defines the init system that the consul-template service should use. Supports 'init', 'runit', or 'systemd'.
  • node['consul_template']['service_user'] - Defines the user that should be used for the consul-template service.
  • node['consul_template']['service_group'] - Defines the group that should be used for the consul-template service.
  • node['consul_template']['template_mode'] - File permissions mode for all consul-template configuration files.



Installs and configures consul-template using the install method specified in


Installs consul-template using one of the binaries provided by Hashicorp. It
will also verify the checksum. The default attributes includes the latest
version's binaries for all supported OS/architectures, including their


Installs consul-template from source.


Installs and configures the consul-template service.



Creates configuration files in node['consul_template']['config_dir'], and
reloads the configuration.

For example, if you want to generate HAProxy's config using consul-template,
you may include something like this in your recipe:

consul_template_config 'haproxy' do
  templates [{
    source: '/etc/haproxy/haproxy.cfg.ctmpl',
    destination: '/etc/haproxy/haproxy.cfg',
    command: 'service haproxy restart'
  notifies :reload, 'service[consul-template]', :delayed


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Consul Template Cookbook Changelog

v0.8.0 (May 18th, 2015)


  • Adds support for systemd (GH-21)


  • Updates default version of consul-template to 0.7.0 and adds new checksums (GH-15)
  • Moves checksums to their own attribute file (GH-16)
  • Ensures config directory exists in LWRP (GH-18)
  • Fixes config directory permissions in LWRP (GH-19)

v0.7.0 (February 6th, 2015)


  • Adds recipe and support information to metadata.rb
  • Released to Chef Supermarket
  • Switching to true SemVer. To this point we were matching the version of the consul-template project, regardless of the changes to the cookbook itself.

v0.6.5 (February 5th, 2015)


  • Assigns ownership of config files to the service user when using runit (GH-10)


  • Redirect stderr to stdout in the consul-template runner so that the runit logger gets the log data (GH-11)
  • Allow the consul_template.log_level attribute to control the log level used by consul when managed by runit (GH-11)
  • Dramatically improves ChefSpec test speed by switching to SoloRunner
  • Switch to JSON dump for default.json config file (GH-12)
  • Updates default version of consul-template to 0.6.5 and adds new checksums (GH-13)

v0.6.0 (January 23, 2015)


  • consul_template_config no longer notifies consul-template to reload from inside the LWRP (GH-8)


  • Updates default version to 0.6.0 and adds checksums (GH-9)
  • Adds usage message to generate-checksums script when no version is specified (GH-9)

Foodcritic Metric

0.8.0 failed this metric

FC031: Cookbook without metadata file: /tmp/cook/154acd3c6d0a5ac2a42cf8bb/consul-template/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/154acd3c6d0a5ac2a42cf8bb/consul-template/metadata.rb:1