claranet / puppet-consul_template

A Puppet module to manage the config and jobs of Consul Template from Hashicorp
Apache License 2.0
30 stars 89 forks source link

add support for Vault connectivity in consul template config.json #24

Closed sjoeboo closed 8 years ago

sjoeboo commented 9 years ago

per Consul-tempalte docs, something like like

vault {
  address = "https://vault.service.consul:8200"
  token = "abcd1234" // May also be specified via the envvar VAULT_TOKEN
  ssl {
    enabled = true
    verify = true
    cert = "/path/to/client/cert.pem"
    ca_cert = "/path/to/ca/cert.pem"
  }
}

I'd be happy with even just passing this in a hash directly, ie:


---
consul_template::vault_config_hash:
  address: "https://vault.service.consul:8200"
  token: "abcd1234"
  ssl:
    enabled: true
    verify: true
    cert: "/path/to/client/cert.pem"
    ca_cert: "/path/to/ca/cert.pem"
gdhbashton commented 9 years ago

Can you try current master ? I've just checked in support for this. It's untested so I will revert if I don't hear back in the next day or two, unless I get the chance to test it myself.

Cheers, Gavin.

sjoeboo commented 9 years ago

I haven't had time to test this yet, but its sounding like in the next few days i will, i'll report back as soon as we get to it!

sjoeboo commented 9 years ago

So, finally got back to this can I can say the vault options all work well! However, the default version of consul template (0.6.0 doesn't support vault, it was added later). I've forked this and updated to 0.10.0 as I didn't seem to be able to get the version parameter to actually be used (kept downloading 0.6.0)...

gdhbashton commented 8 years ago

Thanks for this - I'm finally getting round to doing some work on this again, and I've bumped the default installed version to 0.10.0 in master. There'll be a new Forge release later today.