FAQ
I'm also interested in this. For the moment i use a set of top scope
variables and weird combinations between them to get some sort of hierarchy
for files:

*fileserver.conf:*
[vgh_private]
path /data/puppet/groups
allow *

*site.pp:*
$files_source = "puppet:///vgh_private/${::group}/files"
$files_sources = [
"${::files_source}/${::fqdn}/",
"${::files_source}/${::domain}/",
"${::files_source}/${::role}/",
"${::files_source}/common/",
'puppet:///modules/'
]

*params.pp:*
$source = suffix(pick($::files_sources, ['puppet:///modules/']),
$module_name)

*config.pp:*
file {'NginX ConfD':
...
path => $nginx::params::conf_d,
source => suffix($nginx::params::source, '/conf.d'),
}

At some point in the past I also had a custom function:
https://gist.github.com/vladgh/5891389

All this adds extra complexity, and I am interested in an easier way (maybe
support for variables other than host, domain and fqdn in the fileserver
config).

Vlad.

On Wednesday, January 9, 2013 4:37:46 AM UTC-6, Andreas Hilboll wrote:

Hi,

in the docs at

http://docs.puppetlabs.com/guides/file_serving.html#serving-files-from-custom-mount-points
there's an example on how to serve private files via

[private]
path /data/private/%h
allow *

However, my private files are identical for classes for webservers, i.e.
SSL private keys for webservers. All these webservers have hostnames
webXX, where XX are some numbers.

Is there a way to tell the puppet fileserver config to send all hosts
matching a certain hostname pattern to the same directory?

Thanks for your insight!
Andreas.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJan 9, '13 at 3:09p
activeJun 29, '13 at 2:53p
posts3
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2021 Grokbase