On Tuesday, November 18, 2014 7:27:20 AM UTC-7, jcbollinger wrote: > > > On Monday, November 17, 2014 4:40:28 PM UTC-6, Craig White wrote: >> >> The last file - wl.pp is my own file and it looks like this... >> > >> $ensure = present >> $directory = '/var/lib/ldap' >> $rootdn = 'cn=admin,dc=wl,dc=com' >> $rootpw = 'password' >> $dn = 'dc=wl,dc=com' >> >> # Install openldap server >> class { 'openldap::server': >> } >> >> openldap::server::database { $dn: >> ensure => present, >> rootdn => "cn=admin,${dn}", >> rootpw => $rootpw, >> } >> >> > > Oh no, no, no. You should not add code to a module in order to *use* the > module. Moreover, you should have top-level declarations only in your site > manifest. Your wl.pp is in fact functioning as a site manifest when you > name it in a 'puppet apply' run, so it's not necessarily wrong in itself, > it just doesn't belong in the module (and putting it there confers no > particular advantage). > ---- As usual, John has identified what I am trying to do.
Yes, I want to have an assignable class to what is essentially site manifest coding in anticipation of using an ENC and Hiera. ---- > > > >> and if I use 'puppet apply -vd --modulepath /etc/puppet/modules wl.pp >> >> it works fine but I can't put those variables into the server.pp file or >> any of the files in the /server subdirectory because they don't work. >> > > > I'm not clear on what you're trying to do. When you say "it works" do you > mean that wl.pp achieves everything you're after, or just that it runs > without error? > ---- works as in installs openldap-servers package, configures it per the database instructions I have provided. ---- > > > >> >> I need a method - I thought a class openldap::wl class but I can't make >> that work either. How do I structure this so I can use one class to >> configure clients without resorting to re-writing the module completely so >> it comports to a style that I understand? >> > > > Well, it *looks* like you configure clients by declaring instances of > class openldap::client, which sounds like what you want. The module seems > actually to have reasonably good documentation, including examples, at the > URL you provided. > ---- No - just looking for a way to create a class (or obviously now that everyone is suggesting modifying a 3rd party module is bad form), a new module that is basically site manifest code. I do have more that I want to do and just provided the two things that I just can't make work properly inside of a class but I will try doing it in a new class/module and see if that makes a difference. -- 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/74926f2a-90ad-463a-b34f-743d4d5b068f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.