Hi, Thanks for all the replys, it really helped!
Here is my pam-ldap class, which depends on the openldap-client class and works fine with the help I got from you guys. It thought it was harder than it is.. Just add require => Package["openldap-client"] and it works since it's coming from openldap-client class which my node included. ------- class pam-ldap { case $operatingsystem { FreeBSD: { $packagelist = ["pam_ldap", "pam_mkhomedir"] } } package { $packagelist: ensure => installed, require => Package["openldap-client"] } case $operatingsystem { FreeBSD: { file { "/etc/pam.d/system": source => "puppet:///configuration/ldapauth/pam.d/freebsd/system", owner => root, group => wheel, mode => 644, require => Package["pam_ldap", "pam_mkhomedir"]; "/etc/pam.d/sshd": source => "puppet:///configuration/ldapauth/pam.d/freebsd/sshd", owner => root, group => wheel, mode => 644, require => Package["pam_ldap", "pam_mkhomedir"]; } } } } ------- On Wed, 18 Mar 2009 09:29:44 +0000, paul matthews <paulsmatth...@googlemail.com> wrote: > Have you tried within the Package instruction for pam-ldap:- > > require => Package["openldap-client"] > > or if the openldap-client package is wrapped up in a class > > require => Class["openldap-client"] > > Cheers > Paul > > 2009/3/18 Ivo van der Meer <i...@crewtty.ath.cx> > >> >> Hi, >> >> I have a class and want to depend on a Package from another class, how do >> I >> solve this ?? >> I have 2 classes one is called openldap-client and the other is called >> pam-ldap. I want pam-ldap to depend on the openldap-client class which >> has >> a Package called openldap-client. >> >> I've tried the following: >> >> - openldap-client::Package["openldap-client"] >> - Class[openldap-client]::Package["openldap-client"] >> >> Has anyone got a good solution to this or is it a bad idea to make such a >> dependency? >> >> >> Kind regards, >> >> Ivo >> >> > >> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---