-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all In one of those "should have been doing better things with my time" moments I got frustrated with creating HTTP authentication files with htpasswd and htdigest. So I created a Puppet type to manage them. You can find the code (including tests! :) ) at: http://github.com/jamtur01/puppet-httpauth There is also a blog post on the whys of how the type came about: http://www.kartar.net/2010/04/puppet-type-for-http-authentication/ I''d also welcome testing of this - I''ve largely only tested it on Linux and later versions of Ruby. Hopefully it''s also an excellent example of exactly how creating type/providers is fairly simple once you get the hang of it. I''d encourage people to consider how much easier a few simple types and providers might make your life. :) Regards James Turnbull - -- Author of: * Pro Linux System Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBS9WelyFa/lDkFHAyAQJ/Dgf+IicU+Drn0Ud30Hh7P5rR00gMI2GYu+CY e32fUwAXohx+gY9GFmsWf2VHtkSihXm8bldNSLMYB/UIY9LgjcdMSyRgPEvh/r91 +CMRdfy607Emc1qAjUl0dp/PyAa2/uPly4s5WoU0Vs6Oji0F/vI62HCUcNcRX/AX Cq8QEuw82rmw8c76hWXNc0kRYiTYxwErz567FOAye9yGD5rz+knpqWdxMptrJB0H 4yvmJKD3qNEv7yHcWGc30tK/78rLoCrQXgtQZdOASxS/gnxOiplXa+Ck7zU/uq0k nwRM8idh7MdJDVBRUpsjkSTbuZdYB6vVI5ys6kgmTh1Hu2YhtcKMRQ==ZZpU -----END PGP SIGNATURE----- -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
James Turnbull <james@lovedthanlost.net> writes:> In one of those "should have been doing better things with my time" > moments I got frustrated with creating HTTP authentication files > with htpasswd and htdigest. So I created a Puppet type to manage > them. You can find the code (including tests! :) ) at:[...]> Hopefully it''s also an excellent example of exactly how creating > type/providers is fairly simple once you get the hang of it. I''d encourage > people to consider how much easier a few simple types and providers might > make your life. :)It pretty much mirrors my implementation in "puppet and shell", including API, which makes it pleasantly easy to migrate to. It also mirrors the main limitation of mine, as far as I can tell: is there a way I can use this to enforce "only these passwords" in a file? (eg: an ensure => absent for a specified file?) Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 27/04/2010 10:48 PM, Daniel Pittman wrote:> > It pretty much mirrors my implementation in "puppet and shell", including > API, which makes it pleasantly easy to migrate to.Any features you want?> It also mirrors the main limitation of mine, as far as I can tell: is there > a way I can use this to enforce "only these passwords" in a file? (eg: an > ensure => absent for a specified file?)That''s an interesting question - ensure => absent should work fine to limit the presence of a resource but as to creating a file that is managed holistically - i.e. the file must only contain alice, bob and jane - then you''d need to use a file resource and supply the file. Regards James Turnbull -- Author of: * Pro Linux System Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.