On May 16, 2013, at 5:14 PM, Stephen Jones wrote:
> On 05/16/2013 12:34 PM, Alessandra Forti wrote:
>> avoid site related values in the modules directory
>
> I assume you mean things (files, lines in files, scripts, mounts, repos, custom packages etc.)
> that are "site specific".
>
It's more variables
Take a CVMFS client module this is same everywhere except different sites use different
cache location, cache_size, proxy servers, ....
working example
https://github.com/cvmfs/puppet-cvmfs/blob/master/manifests/params.pp
What is great about hiera is that having done something like:
$cvmfs_http_proxy = hiera('cvmfs_http_proxy','http://squid.example.org:3128')
the way hiera does look up is then also up to the site. Are backend switches based
on hostgroups, operating system, hostname, location ,... but this is a site's choice
to reflect their own sites complexity.... You can have an entire hiera database as
just one YAML file. This is how Rod uses our cvmfs modules in Munich in fact.
> So is "hiera" a way to bury replacement variables (macros) in the class definitions? We
> don't use it; I've found a bunch of workarounds that do the trick here. Maybe we'd consider it,
> though - some of our methods are kludgey, but functional.
>
> I don't know if it's worth it, though. I'll check it out.
>
> Steve
>
>
> --
> Steve Jones [log in to unmask]
> System Administrator office: 220
> High Energy Physics Division tel (int): 42334
> Oliver Lodge Laboratory tel (ext): +44 (0)151 794 2334
> University of Liverpool http://www.liv.ac.uk/physics/hep/
|