facter confine boolean logic decisions

600 views
Skip to first unread message

Peter Meier

unread,
Apr 18, 2008, 8:58:05 AM4/18/08
to puppet...@googlegroups.com
Hi

while writing facts I heavily use confines to avoid that facts get
loaded where they shouldn't. However I didn't yet find out how I can add
a multiple decision to a confine.

so normally I have

confine :kernel => :linux

but what when kernel can be linux or sunos? just add 2 confines? or can
I nest them?

something like
confine :kernel => :linux||:sunos
would be nice.

thanks and greets Pete

Ohad Levy

unread,
Apr 18, 2008, 10:04:49 AM4/18/08
to puppet...@googlegroups.com

confine :operatingsystem => %w{Solaris Linux Fedora RedHat CentOS SuSE Debian Gentoo}

Cheers,
Ohad

Peter Meier

unread,
Apr 18, 2008, 10:52:41 AM4/18/08
to puppet...@googlegroups.com
hi

> confine :operatingsystem => %w{Solaris Linux Fedora RedHat CentOS SuSE
> Debian Gentoo}

cool thanks. after seeing that I also found out that:

confine :kernel => [ :sunos, :linux ]

is also working.

greets Pete

Reply all
Reply to author
Forward
0 new messages