Displaying 20 results from an estimated 2000 matches similar to: "Custom utils lib"
2011 Apr 07
12
Mutliple custom facts not showing in facter
Hi,
I''ve noticed that defining multiple facts in one file is possible, and
puppet can make use of them correctly, but when trying to call with facter
--puppet they are not shown, do I need something special to make them work
as any other single custom fact?
Master is running 2.6.7
This is a custom fact with two facts in it:
[modules/foobar/lib/facter/foobar.rb ]
require
2012 Nov 07
1
Reload fact variable during run
Hi,
I just made a custom fact to display a status about mysql.
The fact variable is ''foo''.
In a module I test this fact variable to apply or not a ressource :
class bar {
if $::foo == ''toto'' {
notice("Execute ressource")
# Reload fact variable ?
if $::foo == ''toto'' {
fail("Ressource not
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
2007 Aug 18
0
Out of memory error while running puppet
I found what the problem is but I am posting this so hopefully people
don''t scratch their heads when this happens.
I need to be able to configure different things depending whether I''m
running on a system that has a Xen kernel or not. I added a fact in
/var/lib/puppet/facts/
Facter.add("xen_kernel") do
server= `uname -r`
if
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|
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:
2009 Dec 21
5
custom fact and environment variable
Hello,
I''m trying to add an environment variable as fact like this :
#export $FACTER_test="infof"
#facter | grep test
test => infof
But my fact don''t synchronize with puppet master. I don''t see it in /
var/puppet/yaml/clientfile.yaml
If I want this works, I''ve need to start puppet like this :
#puppetd -vt --factsync
but factsync''s
2012 Dec 07
2
Is there any ways to fetching custom fact after some resources setuped?
I''m currently trying to create icinga module and the icinga-web and
icinga-idoutils-libdbi-mysql from rpmforge
store the initial sql file in version numbered
directory(/usr/share/doc/icinga-web-1.7.2/~~~).
So, I try to determine the version number from the yum info like as below,
but that repository installed after my yum module gets work done.
Is there any ways to fetching custom
2008 Jan 08
1
odd facter error with split
Not sure if this is another issue cropping up with 0.24.1 but I''m getting
the following:
info: Loading fact raid
/etc/puppet/facts/location.rb:5: private method `split'' called for
nil:NilClass (NoMethodError)
from /usr/lib/ruby/site_ruby/1.8/facter.rb:510:in `call''
from /usr/lib/ruby/site_ruby/1.8/facter.rb:510:in `value''
from
2013 Jun 22
2
slow bootloader on Dell R320
Hi all !
Thanks for the very good support of Dell R320 hardware, perc H310 is
well supported, BCM5720 seems to work correctly and performances are
great.
The only problem i have found is very strange. The FreeBSD bootloader
take many times to load, 30sec-2minutes to boot the kernel and show the
bootloader menu. After that, the system boots properly, at a normal
speed.
Is there any issue or
2013 Feb 22
1
error when call migrate function "error: invalid argument: qemuDomainMigratePrepare3: unsupported flags (0x200)"
Hello,
I try to migrate a VM and I get this error :
loic at loic-VirtualBox:~/workspace/src/build/bin$ ./virsh --connect qemu:///system migrate --live vmUbuntuPartage2CacheWriteBack qemu+ssh://192.168.10x.2x/system --unsafe
loic at 192.168.10x.2x's password:
error: invalid argument: qemuDomainMigratePrepare3: unsupported flags (0x200)
Does somebody know this error?
I am working on windows
2012 Jan 30
2
SLES11: facter without arguments produces Error: uninitialized constant Facter::IPAddress
Hi, I run into problems with the ipaddress fact using the latest
Facter gem (1.6.4, 1.6.5) on SLES11. The versions and gems I use work
perfectly fine on SLES10 SP3.
The problem: running "facter" without arguments results in an error,
even though the erroring fact "ipaddress" is ok.
test:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL
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
2012 Mar 16
3
custom fact issue
Would anyone please assist me on this one? This fact seems to work, but it
doesn''t return when called directly via facter --puppet noop, but the
resulting facts end up in the reports.
I''m at wits end with this. Thanks!
<snip>
utc_hour = Facter::Util::Resolution.exec(%q</bin/date -u +"%H">).chomp
Facter.add(:noop) do
setcode do
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
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
2008 Oct 14
2
Fact load failure
Hi,
I''ve created this fact:
require ''facter''
if FileTest.exists?("/etc/ha.d")
if `service heartbeat status` =~ /running/
cib = `cibadmin -Q`.grep(/epoch/).to_s
epoch = cib.scan(/[0-9]+/).first
Facter.add("cib_epoch") do
setcode do
epoch.to_i + 1
end
end
end
end
end
I''ve tested it as
2007 Oct 12
0
Changes to 'refs/tags/0.5.3'
Tag '0.5.3' created by Benjamin Otte <otte at gnome.org> at 2007-10-12 17:13 -0700
release 0.5.3 ("Tennis")
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQBHD50fvMv5VCdLq8QRAj21AKC+kWUT9YN0gGDxLNS6Bequt5ufjgCgtYgd
9zH6AzP7/BHRfo0j1tw80V8=
=wOYr
-----END PGP SIGNATURE-----
Changes since 0.5.2:
Benjamin Otte:
first try in getting movie
2013 Aug 28
3
passing hiera data to custom fact
I need to create a custom fact based on a parametric information (I need to
get the IP of another machine knowing the hostname, the machine name could
be different for different nodes so I need it parameteric and I recover the
machine hostname from a hiera, but for the purpose of the question it could
also be a data in the module definition).
I''m installing a cluster and need to get
2011 Aug 25
5
custom fact regex problem
Hi guys
I have a custom fact envt, it was working fine but now I have to make
some changes in it;
puppet client''s hostname is of the type 1234qa-abc-de.local where 1234
can be any thing of any length.My custom fact should contain qa, ie I
want to check in the first part(before the first -) of the hostname
if there exists a pattern/word qa and if it exists then my custom
fact
for envt