http://docs.puppetlabs.com/guides/modules.html <-- I guess you want to define your own module.
On Fri, Feb 18, 2011 at 4:17 PM, Jennings, Jared L CTR USAF AFMC 46 SK/CCI <[email protected]> wrote: > Felix, thanks for your quick reply, but I'm trying to write a new type, > not use the file type. I've done stuff like > > file { "/etc/pam_pkcs11/cacerts/myca.crt": > source => "puppet:///modules/pki/cacerts/myca.crt" > } > > But what I want to do now is > > nss_ca_cert { "myca": > source => "puppet:///modules/pki/cacerts/myca.crt" > } > > where I've defined the nss_ca_cert type by writing some Ruby code. The > Ruby that creates the 'source' parameter for the 'file' type is right in > front of me, at /usr/lib/ruby/site_ruby/1.8/puppet/type/file/source.rb, > but I don't understand it well enough to know what I need to take from > it. > >> -----Original Message----- >> From: [email protected] [mailto:puppet- >> [email protected]] On Behalf Of Felix Frank >> Sent: Friday, February 18, 2011 8:52 AM >> To: [email protected] >> Subject: Re: [Puppet Users] custom type with cool source parameter >> >> Hi, >> >> you're not required to add all content to the manifest proper. >> Take note of the file() function. >> >> http://docs.puppetlabs.com/references/stable/function.html#file >> >> HTH, >> Felix >> >> On 02/18/2011 03:41 PM, Jennings, Jared L CTR USAF AFMC 46 SK/CCI >> wrote: >> > I'm making a custom type under Puppet 2.6.4 to manage CA > certificates >> in >> > an NSS certificate database by running certutil. I've got it where >> when >> > I pass a content parameter with the whole -----BEGIN > CERTIFICATE----- >> > ewofifewoiihefwo wfoiefwjowejwfoifj oiejfw oefwij eoijfew ofewij weo >> > -----END CERTIFICATE----- stuff, it will add the CA certificate. But >> I >> > don't want to paste the certificate into the policy, I want to keep >> it >> > in a separate file, and use source => >> > 'puppet:///modules/pki/ca-certs/my-ca.crt' - like the file type > does. >> > Try as I might, I haven't yet been able to duplicate the magic of >> that >> > parameter in my own type. >> > >> > What do I really need in order to get from >> > 'puppet:///modules/pki/ca-certs/my-ca.crt' to '-----BEGIN >> > CERTIFICATE-----...'? Do I need cached attributes? Do I need to > fetch >> > metadata? What's about all these checksums? >> > >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Puppet Users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to puppet- >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
