/puppet-consul_template

A Puppet module to manage the config and jobs of Consul Template from Hashicorp

Primary LanguageRubyApache License 2.0Apache-2.0

#consul_template for Puppet

##Installation

###What This Module Affects

  • Installs the consul-template binary (via url or package)
  • Optionally installs a user to run it under
  • Installs a configuration file (/etc/consul-template/config.json)
  • Manages the consul-template service via upstart, sysv, or systemd

##Usage

include consul_template

Watch files

To declare a file that you wish to populate from Consul key-values, you use the watch define. This requires a source .ctmpl file and the file on-disk that you want to update.

consul_template::watch { 'common':
    template    => 'data/common.json.ctmpl.erb',
    destination => '/tmp/common.json',
    command     => 'true',
}

##Limitations

Depends on the JSON gem, or a modern ruby.

##Development See the contributing guide

Open an issue or fork and open a Pull Request