On Fri, May 28, 2010 at 8:53 PM, James Turnbull <ja...@lovedthanlost.net>wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Nigel Kersten wrote: > > > >> Anyone see any problems with doing it like this? > > > >> require 'puppet' > > > >> Facter.add("certname") do > >> setcode do > > Puppet[:config] = "/etc/puppet/puppet.conf" > > Puppet.parse_config > > Puppet[:certname] > >> end > >> end > > > > Nope... > > Ours is: > > Facter.add("certname") do > path = '/usr/bin/puppet' > setcode do > %x{#{path} --configprint certname}.chomp if File.exists?(path) > end > end > > Which is kind of ugly in parts and I've been meaning to rewrite it... :) > Heh. That's kind of what we were doing, but it hit me it was a little silly given we're running inside Puppet already. > > James > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (Darwin) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEVAwUBTACPtSFa/lDkFHAyAQKsqAf8DNBlnJU1F8YXXqPYqMhZ81mMAko4w1zs > htu4ATkZYGoLmFlaLd16mX34gHkpfjzaKViexwgDuZMtPhuU4QeN5P+jJ+OfzZHD > lYTDocv0B+DGgr9wchBfudYDKmdBeIbTb9TvdwArYNycPHLyVX2ow9SXVKh04WZL > NNhNVza41W60w2ZKFv0NV3b0IhO+nnt652BvtDz1ztXi06b+jnY2kxCmwjrtuMGj > 6Ao6d8j7bNj+B/RZQujbrjhObD/DxK0zqc8JloO02ym+ZqD1r+g4qHzr2sk5KcZD > XlLE7bhzHVgxFrOWtXNMUJ+u7gOoFnZJ5Pp2Go7DGGDFWXdvRUt5bw== > =08y1 > -----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-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- nigel -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.