similar to: Using Facter to find the Java version running on the machine

Displaying 20 results from an estimated 4000 matches similar to: "Using Facter to find the Java version running on the machine"

2007 Nov 13
6
Facter and arrays
Hi, Is it possible to have an array as the output of a custom fact? And then to pass it into a template in Puppet? I currently have a fact that looks like this: Facter.add("exports") do setcode do case Facter.hostname when (/thishost/i): [ "/local", "/local2" ] end end end & a template like this: <%
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
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 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
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|
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 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
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 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 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
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 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 Jun 08
5
Help needed with a basic recipe
Can anyone point me to a "Writing Puppet recipes for Dummies" doc? I''m trying to do a basic probe using lspci to see if I have a Qlogic HBA installed on the machine, and if so, install the Qlogic scli package. Here''s a shell script of what I''m trying to do: #!/bin/bash vendor=1077 # QLogic model=2422 # 24xx hba /sbin/lspci -n -d $vendor:$model | grep
2009 Dec 09
3
facter 1.5.7 all lsb* items missing
I have 2 RHEL 5.4 systems where all facter lsb* items are missing. Any ideas? Sanitized facter output: architecture => i386 domain => missyou.edu facterversion => 1.5.7 fqdn => broken.missyou.edu hardwareisa => i686 hardwaremodel => i686 hostname => broken id => root interfaces => eth0,sit0 ipaddress => 1.2.1.5 ipaddress_eth0 => 1.2.1.5 is_virtual => true
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
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 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
2007 Apr 04
5
sshkey
Hello all, How are you using the sshkey type? Are you using it to list hosts and keys in a class that nodes include in order to manage /etc/ssh/ssh_known_hosts or something else? How does any of this relate to the sshrsakey and sshdsakey facts on the host? I read some stuff about this on the Virtual Resources page but it''s too vague for my simple mind and I''d be reluctant to use
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: