similar to: custom fact regex problem

Displaying 20 results from an estimated 3000 matches similar to: "custom fact regex problem"

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
2009 Jul 27
4
Custom fact errors
I''m a newbie attempting to get a custom fact distributed to clients. I''ve followed the instructions at http://reductivelabs.com/trac/puppet/wiki/AddingFacts and based my first fact on a simple recipe. I''m having at least one problem and possibly more. 1) Puppet/facter fails to load the custom fact, complaining that "non- sh interpreters are not currently
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 Feb 03
16
neatest way to determine a major version of centos/linux?
Just started a rollout of centos 6.x across our Puppet deployment (100-odd servers). what fact would people suggest I use to distinguish 5.x from 6.x (quite a lot of subsystems are different between major releases)? lsb* facts don''t seem to be present on centos 6 - is this an EPEL bug, or have they just been removed in Facter? Thanks! -- You received this message because you are
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
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 May 11
3
Exception handling in custom facts
Hi. I''d like to use exception handling in my custom facts. For example, in plain Ruby: begin buildno = '''' bcrelease = open("/etc/BCrelease") while (line = bcrelease.gets) line = line.chomp buildno = $1 if line =~ /^Build:\s+(\d+)/ end bcrelease.close print "#{buildno}\n" rescue print "No
2012 Jul 04
12
How to get an input file to a facter ?
Dears all, I was testing my localusers facter by puppetmaster fileserver but i''d got in error Could not retrieve localusers: No such file or directory - /etc/ puppet/whitelist I was pretending the file was served by fileserver of puppetmaster doing in init.pp : file { "/etc/puppet/whitelist": ensure => present, Just before to call a facter. I
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
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
2011 Jun 30
4
using memorysize fact in manifests
Hi, I want some config depending on memorysize. What I tried was if ($memorysize >= 256 * 1024*1024) { ... } But this fails because $memorysize is a string (and contains a "G") and can''t be compared to an int. Are all facts strings? How do I work with numbers? regards, Andreas -- Andreas Kuntzagk SystemAdministrator MDC Berlin / BIMSB Tel.: +49 30 9406 2997 --
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|
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
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
2010 Apr 09
2
Custom facts for a puppetmasterless environment
I see the instructions for creating custom facter recipes here: http://projects.reductivelabs.com/projects/puppet/wiki/Adding_Facts and in this thread, James Turnbull suggests that Facter might some day support other languages besides ruby: http://groups.google.com/group/puppet-users/browse_thread/thread/8c127ae8898d3bcf/c5ca551b77c4eb67?lnk=gst&q=facter+perl#c5ca551b77c4eb67 He writes:
2009 Jan 15
8
Pattern matching in case statement
Hi all, I need my servers to decide which network they are in (i.e. dmz), and the only clue is the servers IP-address. I was trying to accomplish it like this, but it doesn''t work: case $ipaddress { "10.1.1.*": { $network = "net1" } "10.2.2.*.*": { $network = "net2" } "10.3.3.*": {
2011 Jan 07
4
facter --puppet does not report "environment"
Is it normal that "facter --puppet" does not show the environment variable? is there a way to have it include it? Thanks a lot, Mohamed. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to
2013 Feb 21
6
Using Facter to find the Java version running on the machine
Hello all, I am currently trying to setup a Custom Fact that will can be used to determine the version of the Java JRE running on a machine, in order to use it in my manifests to ensure the proper JARS are distribured based on environment. I''m trying to use the java -version command and then capture the JRE release (eg "1.6.0_37"). No matter what I have tried, the output
2007 Jul 16
9
DRBD facts
Hi, I can''t find a way to add a page on the wiki (i''m logged in but there is no edit button on the facter recipes page), so here is a recipe for DRBD. It has been tested on version 0.8.4. Can someone publish it on the web site? if FileTest.exists?("/proc/drbd") result = {} Thread::exclusive do File.readlines("/proc/drbd").each do |l| if l =~
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