Displaying 20 results from an estimated 30000 matches similar to: "File directive"
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
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
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
2013 Oct 13
24
exporting custom facts to puppet agents
Dear all,
I have a custom fact, that reads a file and then generate the values
dynamically based on the file content. It''s something like this:
inFile = "/home/admin/OSs.txt"
> gos = {}
>
> if File.exist?(inFile)
> open(inFile, ''r'').each do |line|
> next if line =~ /^\s*(#|$)/
> parts =
2013 Nov 18
3
Is it possible to evaluate a string as a parameter name?
Hi,
I''m looking to combine a couple of fact names with the value of a class
parameter to create and lookup the resulting fact''s value. Is that
possible? For example, my class will take the parameter "my_default_nic"
from beyond. So I know that as long as $my_default_nic exists on the
client, then so will facts like macaddress_<NIC>, netmask_<NIC>,
2013 Apr 22
3
Udefined method `get_uptime` for Facter::Util::Uptime:Module
Hi,
I''m rookie puppet user and I trying to establish simple Server-Client
connection on configuration:
Server: *Fedora F18*, Puppet 3.1.1 (installed by yum), Ruby 1.8.7
Client: *Debian 6.0.6*, Puppet 3.1.1 (installed by guide<http://shapeshed.com/setting-up-puppet-on-ubuntu-10-04/>),
Ruby 1.8.7
Server sign client certificate with success but now I''m struggle with apply
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
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 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
2013 Sep 24
5
Service refresh gets scheduled and swp files
Hi,
I have two issues with my puppet.
*1*- When I change the config the service on the agent side implement the
configuration change but the restart/reload gets scheduled and after 15 or
20 minutes it is executed, however the agent time to get conffig from
server is 180 seconds. Followings are the logs
*(/Stage[main]/Nginx/Service[nginx]) Triggered ''refresh'' from 2 events*
2013 Sep 17
6
rspec-puppet require syntax
Can someone tell me the correct way to specify the following require
statement in an rspec-puppet test?
*require =>
[Class[''ssl''],Class[''pcre3''],Staging::Extract["nginx-${version}.tar.gz"]]*
I tried this: *''require'' =>
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
2013 Mar 07
2
Puppet Dashboard changed reports view error
Hello Puppet Users !
We encounter a problem with the dashboard on this URI : /reports/changed
The /reports works fine with ~130000 reports (up to 3 months and
auto-cleaning with rake reports:prune job)
I make a reports:prune:orphaned, juste in case, but without any success.
The most recent change on the server was the puppetmaster upgrade from
3.0.2 to 3.1.0.
Here is the dashboard error log
2013 Mar 11
3
Restructure puppet modules
So far we have a similar situation, for each different server one fabric
and one puppet file, where the fabric file simply applies it in a brutal
way.
with settings(user=''root''):
put(''qa.pp'', ''qa.pp'')
put(''puppet apply qa.pp'')
And puppet files don''t use anything like classes or modules, but
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 Sep 11
4
getting array of hostnames of clients
I need to get an array of hostnames of clients of the puppet server.
There doesn''t seem to be a simple way to do this so I''ve tried a few
methods.
I''ve tried a curl expression in a fact like this:
curl -s -k -H "Accept: yaml"
https://localhost:8140/production/facts_search/search?facts.nodetypet=testnodes
where I''ve got a nodetype fact which works
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
--