Hey all,

 I have a module that I've written called 'lumberjack'. It installs the
logstash forwarding agent called 'lumberjack' and gets the service running.
However it depends on ca certificate which I include in another class
(called simply 'ca').

Yet if I try to include a resource from the 'ca' class I get the following
failure:

err: Failed to apply catalog: Could not find dependency
File[/etc/pki/CA/certs/ca.crt] for Service[lumberjack] at
/etc/puppet/environments/production/modules/lumberjack/manifests/service.pp:8

I really did think that if I included a class into another one like so:

class lumberjack::service {

  include ca

  service { lumberjack:
     ensure => running,
     require => File["/etc/pki/CA/certs/ca.crt"],
  }


}

I'd be able to refer to the resource from the other class. I think we had a
debate about the rightness or wrongness of including material from other
classes in our resources. So I'm just wondering what the best way of going
about what I'm trying to achieve might be.

The goal here will be to install the lumberjack log shipping agent and get
the service running in one fell swoop. If I remove the cert requirement
(require => File["/etc/pki/CA/certs/ca.crt"],)  the puppet run will error
out initially when it tries to run the service and can't find the ca.crt
file. The second run will generally be ok.

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

-- 
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/CAOZy0ekA-nTXshS%3DUtGCXEBOdP%2BhO-%2B_QT7z%3Da6xJwq0b2_Gow%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to