Displaying 20 results from an estimated 8000 matches similar to: "facter confine boolean logic decisions"
2012 Mar 28
4
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Hello,
I''m having some trouble. I keep getting the following warnings when
trying to run:
$ puppet master --no-daemonize
/usr/local/build/puppet-bundle/vendor/gems/ruby/1.9.1/gems/
puppet-2.7.12/lib/puppet/external/pson/pure.rb:7:in `<module:PSON>'':
iconv will be deprecated in the future, use String#encode instead.
Could not load confine test
2013 May 29
5
Developing custom type/providers for multiple OS
Hello all,
I am developing a few custom providers for some features that I need into
my system (such as dealing with different zipped files or generating some
JSON data based on OS files) and I have hit into a question about "how to
do this for multiple OS?"
Lets focus into the zipped file provider that should provide a common
method to pack or unpack zipped files (tar, tar.gz,
2012 Jul 17
8
How to override $::operatingsystem fact
Hi,
I want to introduce "Proxmox" as new value in $::operatingsystem.
"Proxmox" is based on Debian, so the normal value is currently "Debian".
To change that, I just write a custom fact based on the facter fact
"operatingsystem"
Facter.add(:operatingsystem) do
> ...
> setcode do
> ...
> elsif
2007 Apr 26
2
[PATCH] facter: add interfaces, default_gateway facts on Linux
Quick and dirty:
--- lib/facter.rb (revision 203)
+++ lib/facter.rb (working copy)
@@ -989,6 +989,18 @@
%x{/usr/sbin/scutil --get LocalHostName}
end
end
+ Facter.add(:interfaces) do
+ confine :kernel => :linux
+ setcode do
+ %x{/sbin/ifconfig -a -s}.split($/)[1..-1].collect {|line|
2009 Apr 26
5
Factor questions
Hello,
I''m new to puppet and facter. Initially we are planning on using
facter/puppet to inventory machines (Mac, Ubuntu, and RHEL). We plan
on writing a number of custom facts. Obviouly some of the facts will
only be specific to some OSs. I know there is a "confine" method, but
it confuses me. It seems the confine statement in some of the recipes
and in the Turnbull book is
2010 Jul 19
1
facter fails to recognize OEL/OVS in operatingsystemrelease.rb
For the benefit of those running OEL (Oracle Enterprise Linux) or OVS,
be aware that under 2.6.0rc4 facter doesn''t properly recognize OEL in
/usr/lib/ruby/site_ruby/1.8/facter/operatingsystemrelease.rb. A diff
for a fix is below; probably not the best fix but if you need it work
now, this''ll do it for you.
I''ve already filed a bug:
2007 Mar 03
0
Facter recipies
Hello! In going over some of the sample cases on the Puppet wiki,
(specifically the Debian tips) I saw a pretty clear need for more
facts. Is there a place to submit new facts?
In this case, the definition of a variable for each node''s Debian
Version seemed like an easy thing to introspect. The following is
what I whipped up... please let me know if I''m doing
2012 Aug 13
1
Ruby Facter.add syntax please help
Hi,
Please could someone take a look at the below code and tell me where it is
failing ?
Facter.add(''syslocation'') do
#confine :kernel => "Linux"
setcode do
name = Facter.value(''hostname'')
case name
when /^e(t|d|u|s|p|q)(p|v)(sol|lin)\d+/
"E DC"
when
2011 Nov 28
1
Errors on both client and server when setting up initial puppet infrastructure
Hey all. I am trying to set up puppet for the first time and I am
having the following issues.
On the client when I run it I get this error.
Running puppet agent it should configure itself now
/usr/local/lib/ruby/gems/1.9.1/gems/facter-1.6.3/lib/facter/util/config.rb:7:
Use RbConfig instead of obsolete and deprecated Config.
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
2008 Jul 08
12
ANNOUNCE: Facter 1.5
Hi all,
I''ve finally gotten around to releasing Facter 1.5.
As the version bump implies, this is a relatively significant release
(for a 2.3k line program, anyway). Mostly, the biggest change is
refactoring the code internally so that all of the functionality is
split into separate classes in separate files.
Also, the facts are all loaded on-demand, which provides dramatic
2012 May 16
2
Announce: Facter 2.0.0rc1 Available
Facter 2.0.0rc1 is a feature release candidate with bug fixes,
features and other improvements.
Facter 2.0 is designed to accompany the upcoming Puppet 3.0 release
and has breaking changes from Facter 1.6.x. Facter 2.0 is not
backwards compatible with Puppet 2.6 or 2.7.
It includes contributions from the following people: Chris Price,
Daniel Black, Daniel Pittman, Garrett Honeycutt, Gary Larizza,
2012 Jun 18
8
Conditional with variable from facter
Hi.
I have the following facts available:
# facter | grep oper
operatingsystem => CentOS
operatingsystemrelease => 6.2
Now, if I wish to use conditionals on these facts, I have to do it like
this:
case $operatingsystem {}
case $::operatingsystemrelease {}
I''m puzzled as to why can''t I just use $operatingsystemrelease, and what
do these two semicolons mean?
Thank
2008 Feb 02
5
Service ensuring fails on some distro (gentoo) with some packages
Hi
I''m having the following problem and tried already several workarounds,
as well benp- tried to help me on irc.
I copied the ntp modul from DavidS repo and adapted it in the Service
part to run as well under openbsd. Which was just adding some binary if
openbsd is the operatingsystem.
However then I wanted to run it as well on a gentoo system (on centos,
debian and openbsd it was
2010 Aug 28
1
ANNOUNCE: Facter 1.5.8
For 40 days and 40 nights Facter wandered in the wilderness sustained
only by the occasional patch and bottle of Kool-Aid.
Slightly less tanned and equally happy Facter 1.5.8 has arrived!
1.5.8 is a feature and maintenance release containing a number of fixes,
updates and additional tests.
You can get the release at:
http://reductivelabs.com/downloads/facter/facter-1.5.8.tar.gz
Please log any
2008 Oct 08
9
Inheritance syntax question
If I try the following:
class foo {
define bar ($text) {
file {"/tmp/foo.txt":
content => $text,
}
}
bar { "hello":
text => ''Hello World'',
}
}
class foo2 inherits foo {
Foo::bar["default"] {
text => ''Hello World Again'',
}
}
I get: "Syntax error at '':''; expected
2007 Jul 03
3
$operatingsystem variable.
In the documentation, there is an example such as this:
case $operatingsystem {
sunos: { include solaris } # apply the solaris class
redhat: { include redhat } # apply the redhat class
default: { include generic } # apply the generic class
}
I''ve seen the $operatingsystem variable used elsewhere.
What actually puts the value into the $operatingsystem variable?
Does
2008 Jan 03
4
Package Source Definition
Hi
i''m trying to describe some class with a package to install, which
should work on different linux-distro''s as well on linux and openbsd:
class vim {
package { ''vim'':
name => $operatingsystem ? {
centos => vim-enhanced,
default => vim,
},
alias
2013 Feb 21
8
Facter & Puppet disagree on RHEL 6?
I''ve run into an odd one on one of my new RHEL 6 boxes. Puppet and Facter
seem to disagree about the value of a fact.
Puppet version: 2.7.9
Facter version: 1.6.4
Module: puppetlabs-apache
apache::params falls through its if structure:
if $::osfamily == ''redhat'' or $::operatingsystem == ''amazon'' {
...
} elsif $::osfamily ==
2007 Apr 25
12
Facter repository
Is there a repository of Facter plugins that people have made? I''m working
on a few that i wouldn''t mind sharing when complete.
2008 Sep 30
6
something wrong with puppet client or Server
Hi All,
I have running puppet client and server on solaris 10 x86.
Now days some of puppet client behaviors is something weird !!! or May
be i am missing something...
for ex.
I created class to add one line in /etc/vfstab . but puppet client
did it successfully 1st time ...But .. After few days , i saw there
are same line has been added more than 250 times.. [ see same line is
added so many