Displaying 20 results from an estimated 3000 matches similar to: "Custom functions and facts"
2012 Apr 11
8
Facter not initialized in rspec in puppetlabs-stdlib?
I have been working on adding some predicate functions to puppetlabs-stdlib
that test things based on ''interfaces'' and related facts.
The functions themselves seem to work fine in my manifest-based smoketests,
but I am running into trouble that may or may not be due to my ignorance
about rspec or Facter. Something needs to be done to initialize Facter
because
2007 Jun 12
6
facts from ldap
Does any one have a recipe for getting facter facts from ldap?
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
5
$processor fact not working on OS X
Hello dear list.
First of all thanks to all the developers for the great work on puppet.
After using it for a while, there is not better tool to manage a network!
I have a problem with the $processor fact, which seems to be either not
there or ignored at all.
I try to implement package deployment for the Macs (Intel vs. PowerPC)
as described here:
2007 Jun 22
1
Where are Facter facts?
I can''t seem to find anyplace that list the facts that I can us in my
puppet scripts; can somebody please point me in the right direction?
--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--
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>,
2006 Jul 26
19
documentation suggestions: including FQDN seems to
Hi,
I''m new to Puppet, but it looks very good, so far.
We are going to use it for a multi-tier (DEV, QA, staging,
production) environment which is consists of web, app, and database
servers.
I have a couple of suggestions for the Puppet documentation that may
save others some time.
First, it seems node names MUST be FQDNs (hostname and hostname. will
not work). Since we are not using
2012 Nov 06
19
puppet failing to run
I am getting this error after installing puppet with gem
$ gem install puppet
Fetching: facter-1.6.14.gem (100%)
Fetching: puppet-3.0.1.gem (100%)
Successfully installed facter-1.6.14
Successfully installed puppet-3.0.1
2 gems installed
Installing ri documentation for facter-1.6.14...
Installing ri documentation for puppet-3.0.1...
Installing RDoc documentation for facter-1.6.14...
Installing
2011 May 23
2
Variable interpolation challenge
I''m having a problem with variable interpolation that I haven''t found a good
solution to. I want to use a variable as part of the name of a fact, but
the interpolation doesn''t work as expected. I''ve allowed for passing the
mac address into my define() but if it''s not provided I want to look it up
via facter.
if
2007 Feb 07
9
Creating random shared passwords/keys
Hi there,
I have a problem I don''t know how to solve. Let''s say you have two services,
applications, whatever that communicate with each other, and they establish
a shared password or key to authenticate to the other part. This happens
with DHCP/DNS (I think is called dynamic zone update, the DHCP server
updates the DNS zone with information from the dynamically configured
2011 Jan 13
5
Problem restarting the agent
Just installed Puppet 2.6.4 on Ubuntu 10.10
I was trying to restart the puppet agent but got the following error
and the agent didn''t run:
$ sudo puppetd --server server.domain.com --waitforcert 60 --test
err: Could not retrieve catalog from remote server: SSL_connect
returned=1 errno=0 state=SSLv3 read server certificate B: certificate
verify failed
warning: Not using cache on failed
2010 Sep 07
2
Environmental Variables
Hi Everybody, I been looking through google for better part of the day but I
haven''t been able to find an answer to my problem.
I need an environmental variable to be present in puppet, so that yum works
correctly. However after reboot puppet doesn''t read /etc/profile and starts
without this profile.
If I go into server and do services puppet restart than everything works
fine,
2007 Mar 29
7
Refering to node name (or part of node name) in a class / function
Hi,
I was wondering if it is possible to gain access to the nodename as a
variable, in order to refer to the name or part of it inside a class.
Eg: I have a lot of sites that essentially have the same configuration,
except they are in different domains and have different requirements for
things like resolv.conf. I can manage this by creating a node definition
for each node and specifying some
2008 Dec 01
2
configuring puppet to run custom facts
Hi,
I''m following
http://reductivelabs.com/trac/puppet/wiki/PluginsInModules in order to
use a custom fact.
My modules looks like:
# ls manifests/modules/network/
manifests plugins
# ls manifests/modules/network/plugins/facter/primaryint.rb
manifests/modules/network/plugins/facter/primaryint.rb
as is said in doc.
Then:
Turn on pluginsync and specify factpath, so that the facts
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 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:
2008 Jan 06
3
Mac OS X pkgs up.
So I''ve done some Mac OS X pkgs for the latest Facter and Puppet, as well as
a combined mpkg for them both.
Jeff McCune and I are doing a fair bit of testing on them this week in
preparation for MacWorld, so I wasn''t going to upload them to the official
site for another few days, but they''re looking pretty good.
http://explanatorygap.net/puppet/Facter_1.3.8.pkg.zip
2012 Jun 14
15
Problem with Load Balancing Puppet masters with Apache mod_proxy
I have a single LB running Apache with mod_proxy in front of a Puppet
master. These are the LB and Puppet master configs:
<Proxy balancer://puppetmaster>
BalancerMember http://192.168.1.10:8140
</Proxy>
Listen 8140
<VirtualHost *:8140>
SSLEngine on
SSLCipherSuite SSLv2:-LOW:-EXPORT:RC4+RSA
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite
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.*": {
2012 Jun 18
8
Conditional with variable from facter
Hi.
I have the following facts available:
# facter | grep oper
operatingsystem => CentOS
operatingsystemrelease => 6.2
Now, if I wish to use conditionals on these facts, I have to do it like
this:
case $operatingsystem {}
case $::operatingsystemrelease {}
I''m puzzled as to why can''t I just use $operatingsystemrelease, and what
do these two semicolons mean?
Thank