We run into that fairly regularly, and what you describe is pretty much 
what we have done in most cases... Create a ldap profile class that all 
nodes (or whichever) run, and from that it calls the openldap module with 
variables you get from hiera. 

Bill

On Monday, February 27, 2017 at 12:17:59 PM UTC-5, Peter K wrote:
>
> I see the value of keeping data separate from code via hiera...but I'm 
> missing something in when it comes to using a pre-built module that wasn't 
> designed to be used with hiera.
> I'm working with bodgit's openldap module 
> <https://forge.puppet.com/bodgit/openldap> and I can get it to work when 
> I put the configuration data into site.pp...but I can't figure out how to 
> re-factor the configuration to live in my common.yaml.
> My only idea is to create my own module that call's bodgit's openldap 
> module but provides variables that hiera can call. Here's the code that 
> works in my *site.pp*:
>
> node default { 
>
>         class { '::openldap':
>           tls_cacertdir => '/etc/openldap/certs',
>           base   => 'ou=People,dc=example,dc=com',
>           uri    => ['ldap://auth.example.com/'],
>         }
>                 
>         include ::openldap::client # this installs the openldap client 
> software:
>
>  }
>
> Feel free to point me to what I need to read. I feel I'm missing some 
> concepts.
> thx,
> -peter 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b8a76546-75cd-43d1-a430-b38e2bb56f57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to