FWIW, I happened to try on OS X, but our target is many different linux
distros. As long as there's some consistency across those. Oh, soon, we'll
be supporting Windows server as well.

David

On Thu, Apr 14, 2011 at 6:20 PM, Daniel Pittman <[email protected]>wrote:

> On Thu, Apr 14, 2011 at 14:16, David Kavanagh <[email protected]> wrote:
> > I'd like to use Facter to determine how many cores or processors are
> > available and edit a property file accordingly. I run it on my Mac and
> get
> > sp_number_processors and on my Centos box, get processorcount.
> > Both are using facter 1.5.8
>
> Hey.  This is a known issues: the sp facts are all from a MacOS
> central store of machine data, and are named to reflect that.  The
> actual processorcount fact is unimplemented on OS-X, even though we
> have the right data elsewhere.
>
> You will just have to use the appropriate one for your platform;
> personally I would add to the top of site.pp:
>
> if $kernel == 'Darwin' {
>  $processorcount = $sp_number_processors
> }
>
> Then you can use the processorcount name across the board. :)
>
> Daniel
>
> I typed that code from memory, rather than checking a working system,
> so it might have a syntax error, but you get the idea. :)
> --
> ⎋ Puppet Labs Developer – http://puppetlabs.com
> ✉ Daniel Pittman <[email protected]>
> ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
> ♲ 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 [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.

Reply via email to