adamkrone/chef-consul-template — pull request #1 by inean (2014-11-16 19:13:08+00:00)
Title: Add support for consul-template 0.3

The newly released consul-template 0.3 adds an option to read configuration from a config_dir instead of a single config file. This set of patches refactor service recipe to follow this approach. Now main configuration options (wait, token, etc) should be defined into `node['consul-template']['config']` as a set of key value entries (like postgresql cookbook).

It also define a consul_service_template LWRP to add templates from other cookbooks:

```
consul_template_config 'haproxy' do
templates [{
source: '/point/to/source',
destination: '/point/to/destination',
command: 'template_command
}]
end
```

This should create a config file maned 'haproxy' into `node['consult-template']['config-dir]` with `node['consul-template]['template-mode']` permissions (*0600*) and notify `service['consul-template']` to reload config (`:delayed`).

The reason to use an array as a source for templates is to be able to define multiple templates per config file.

Provided commits are self contained, so you could apply them incrementally to verify changes.

Salu2