Displaying 20 results from an estimated 9000 matches similar to: "Puppet own function"
2008 Aug 14
1
multiple functions in one file?
Hi there,
just to be sure:
http://reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions says
that "The file name is derived from the name of the function that Puppet
is trying to run."
Is this still true?
I ask because I currently write a set of math functions (min,max, plus,
minus and so). My first try was to create a math.rb, where I had:
module Puppet::Parser::Functions
2009 Nov 25
1
Puppet custom functions and user permissions
Puppet custom functions and user permissions
I am busy writing a custom function to automatically add OSSEC agents
to a OSSEC server after installation. Unfortunately, it seems that
puppetmasterd is not respecting the entries in /etc/group in linux. No
matter how many other groups the puppet user has been added to in /etc/
group, when puppetmasterd runs the custom function the effective/real
user
2012 Jul 27
0
rspec-puppet: function stubs
I''m looking for a way to stub a parser function within rspec-puppet. This
function returns data based on a database query and I''d rather not have to
populate dummy data inside my rspec tests.
I can redefine the function by doing something like the following:
Puppet::Parser::Functions::rmfunction("lookup_facts")
Puppet::Parser::Functions::newfunction(:lookup_facts,
2009 Jan 02
2
problem with custom funcion
Hello!
I''ve written custom function split - it''s located in modules/common/
plugins/puppet/parser/functions/split.rb and contains:
module Puppet::Parser::Functions
newfunction(:split, :type => :rvalue) do |args|
str=args[0]
regex=args[1]
idx=args[2]
out=str.split(/#{regex}/)
if out.is_a? Array
out[idx]
else
""
end
2007 Jun 06
2
lookup in CSV recipe
I await Luke''s node settings implementation with interest. At the
moment however, I have this sort of ugliness:
$site = $hostname ? {
fred => "opsera",
barney => "bedrock",
default => "unknown site",
...
}
So I''ve knocked up this little function to use CSV files instead. Now
I can just do:
$site =
2013 Mar 07
1
HELP:Custom function didn't work
hi,guys-
I have a mysql database which stores host informations,so I wrote a
function to get some values.
- Here is the function rb(this function should return the type I defined
in the database):
#hosttype.rb
require "mysql"
module Puppet::Parser::Functions
newfunction(:hosttype, :type => :rvalue, :doc => "Gets host type from
db.") do |args|
2013 Feb 03
3
Another "function does not return a value" problem
Here''s the function:
module Puppet::Parser::Functions
newfunction(:fact_to_array, :type => :rvalue) do |args|
args[0].split('','')
end
end
Here''s the class I''m trying to use it in:
class oms::all_config {
file { ''/var/lib/oms/config'':
source => ''puppet:///deployment/deployment'',
recurse =>
2013 Oct 21
3
how to pass the value to custom function?
Dear all,
I''m trying this thing for a while but can''t figure out what am I doing
wrong.
Here is my sample function (which is similar to the original one, except
for the hash, which is generated dynamically in the original one):
module Puppet::Parser::Functions
> newfunction(:am_running_oss, :type => :rvalue ) do |args|
>
> oss =
2012 Feb 22
4
Custom function issue
Hi,
I needed a function to check if a file is existing on the Debian box I
am configuring. So I used this one
module Puppet::Parser::Functions
newfunction(:file_exists, :type => :rvalue) do |args|
if File.exists?(args[0])
return 1
else
return 0
end
end
end
It work greats for some service where apache2 doesn''t work for me.
I am using it this way
2008 May 02
4
Functions vs. Module Plugins vs. Facts
Hey all,
I am trying to get a modified hostname (converting "blah-1234567" to
"1234567") to use in my manifests and templates. I have it working for
templates by using Ruby (*<%= hostname.split(''-'').pop.downcase %>*) but I
haven''t been able to use it in manifests because they don''t process ERB.
The way I see it I could do one of two
2011 May 19
2
custom function from .24.6 not working in 2.6 (from squeeze)
I''m in the process of upgrading an existing installation from .24.x to 2.6.
We seem to have a custom function that is throwing the error:
"err: Could not retrieve catalog from remote server: Error 400 on SERVER:
private method `gsub'' called for #<Array:0x7fdcebf3bbf8> at
/etc/puppet/manifests/classes/apache-php.pp:72"
Here is the function:
"""
#
2012 Jul 27
0
puppet 3 and hiera
I just installed puppet 3 (3.0.0-0.1rc3puppetlabs1) on a 32bit Ubuntu 12.04
''server'' VM. I used the packages for the install.
I then copied over my existing modules and manifests from my production
2.7.x puppet master, and also my hiera.yaml and hieradata/*.
When I run puppet agent --test I get the following:
Error: Puppet::Parser::AST::Resource failed with error
2011 Oct 17
2
puppet dashboard and complex data
So I am messing around with puppet dashboard and for the most part for
what I am working on it fits the bill for an ENC. The only question I
have is I need to pass information about a customer to set up
resources and the system can have multiple customers on it. What is
the best way to handle complex data? Would I be able to pass json data
for example?
--
You received this message because you
2007 May 29
1
Tunnelling Puppet over SSH
I work at a large financial institution (AXA) and we have a large number
of DMZs for our partner and internet-facing servers.
The only access to the various DMZs is via SSH and no DMZ-initiated
connections are allowed back to the internal network. I''d consider
putting a Puppet server in the DMZ but no communication is allowed
between DMZs either.
Has anyone tried tunnelling Puppet
2008 Nov 06
1
introduction with david's munin module question
Hi all,
I am new to puppet and also newcomer in this group.
I heart good things about puppet and I decided to give it a try 2 weeks now.
After reading various documentation, I began using the complete
configuration collection of puppet modules (thanks to David).
But I have a problem with the munin module. It works fine, except that it
seems to not export virtual ressources. Let me give more detail
2007 Jun 08
2
puppet reports
Hi all,
we activated puppet mail reports but we are receiving a lot of mails
when yum fails to update the repos, like this one:
(err): Failed to retrieve current state of resource: Could not get
latest version: Execution of ''/usr/bin/yum -d 0 -e 0 list available
munin-node'' returned 1: Cannot open/read repomd.xml file for repository:
kbs-CentOS-Extras
failure:
2012 Sep 17
2
inheritance failure: duplicate declaration error
Hello list.
I''ve the following parent class:
class munin::client {
...
munin::client::plugin { "postfix_mailqueue":
name => "postfix_mailqueue",
enable => "false"
}
}
And the following inherited class:
class munin::client::plugins::postfix inherits munin::client {
munin::client::plugin {
2007 Nov 23
3
Wanting to seperate MTA and Imap
Hi
Current my set up is that the MTA and Dovecot (maildir) is on the same
machine. Ive been asked to seperate the services from the same machine
(too would like to add a secondary MTA - but thats future ideas).
I read the documentation on NFS, but from other sites i have read.
Most say this is NOT the best solution.
My question is, how do some of the fellow dovecot users,or other
companys, e.g.
2007 Jul 11
3
Strange problem with exported ressources
Hi there,
I have a strange problem with the exported ressources in the munin
module I wrote.
See: http://mail.madstop.com/pipermail/puppet-users/2007-June/003179.html
For some reason it stopped working.
On the munin::host I get the error that:
err: Could not retrieve configuration: Exported resource
File[munin_def_XY_4949] cannot override local resource
The munin::host is also a
2007 May 26
2
OT: Installing munin-node cleanly in spite of RPM
Hi,
This is totally off-topic (it''s an rpm/rpmbuild problem), but I want to
get to a point where I''m installing and configuring munin-node with
puppet. To do that, I need a clean, standardized way of installing
munin-mode on CentOS (RHELish) boxes.
I could install munin-node from source via puppet and probably make
enough edits that all the files end up in reasonable locations