similar to: custom fact issue

Displaying 20 results from an estimated 4000 matches similar to: "custom fact issue"

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
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
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 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
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
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
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|
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
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
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
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:
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
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 --
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
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
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 =~
2007 Mar 26
3
Basic help with imports and includes
Do any of you good people have a moment to help me out with my basic Puppet language skills, I''m a little new around here and getting an error I don''t yet understand. I have an RHEL4 Puppetmaster happily controlling the permissions of /etc/sudoers on an RHEL5 and SolarisX86 client. My actual environment consists of several systems in several locations. All systems need the