Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 75

Accessing resource collector from template

$
0
0
I'm using puppet to deploy haproxy configurations and SSL keys/certificates. I'm trying to use puppet's knowledge about the deployed keyfiles to automatically generate parts of the haproxy configuration but I'm a little stumped on how to best accomplish this. I've reduced the problem to the following non-working code: ### config.erb This site's certificates are: <% @certs.each do |crt| -%>* <%= crt.title %><% end -%> ### test.pp file { '/tmp/1.ssl': ensure => file, content => "secret 1", tag => [site1] } file { '/tmp/2.ssl': ensure => file, content => "secret 2", tag => [site1,site2] } file { '/tmp/3.ssl': ensure => file, content => "secret 3", tag => [site2] } $certs = File <| tag == site1 |> file { '/tmp/config.ssl': ensure => file, content => template('config.erb'), } As my puppet-fu is comparatively weak I'm hoping someone can point me in the correct direction.

Viewing all articles
Browse latest Browse all 75

Trending Articles