similar to: Making a result of custom function available to multiple classes

Displaying 20 results from an estimated 5000 matches similar to: "Making a result of custom function available to multiple classes"

2012 Sep 10
3
How to remove last comma when iterating through hash in erb template
I need to produce a line in a config file in the format x = "ip1,ip2,ip3" I am using the method below to sort the hash before iterating over it. However, as you can see there will always be a final comma which breaks the app that uses this config file. Does anyone know how I could remove the final comma? ipv4_bind_addresses = "<% routes.sort_by {|key, v| key}.each do |key,
2013 Aug 22
4
Could not parse for environment production: Cannot assign to variables in other namespaces
We''re trying to set a role variable in one of our role classes i.e. class role::nameserver { $::role = ''nameserver'' include profile::baseline } however we get the following error Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Cannot assign to variables in other namespaces We do not get
2013 Aug 19
3
Puppet environments vs App environments
I''ve setup dynamic environments using git but I''m confused about how environments are actually supposed to be used. We''re a small ISP and have freeradius servers, VPN servers and web servers. I''ve been using environments to enable me as the sysadmin to build and test new manifests/modules before deploying them to our production servers. I have dedicated
2012 Mar 19
4
[Arrray] grep -v
Hi everyone, I am trying to simulate the ''grep -v'' behavior in an array: Ex: vgrep([''aaa'',''bbb'',''ccc'',''aaaddd''], ''aaa'') Would return: [''bbb'', ''ccc''] So I tried to use ruby to do it: normally the ''-'' operation should be
2012 Aug 29
9
puppetlabs-stdlib
I''m confused about this... https://github.com/puppetlabs/puppetlabs-stdlib/ I see a lot of functions there that are the same as the ones that come standard with puppet. If I create a module and dump this stuff in there, what happens to the existing stuff? How does puppet know which one to use? Doug -- You received this message because you are subscribed to the Google Groups
2013 May 07
2
hiera not using non-root user custom fact
Hi, Before I begin, my environment consists of a standard master/client config with the exception that all my clients run under a non-root user. I have to use non-root so I can''t simply restart under root to fix the problem. Master -> 3.1.1 Client -> 2.7.17 using mostly the hiera() function in my classes. problem: I have run into an issue today where my custom fact is not
2012 Oct 19
3
Using Hiera with Parameters set for the Puppet Node
Is it possible to have Hiera look at a key set for the node first, before looking at other items in the hierarchy? In particular - I''m using Puppet Dashboard and am setting keys & params for there, so I would like for any value set there for a node to be used over another item in the hiera hierachy. What value would I have to specify in the hierarchy for this, if it is possible?
2013 Mar 14
7
hiera_hash lookups for included classes?
When using "include" to include a class Hiera helpfully performs an autolookup on the parameters of the included class. Specially-named variable names are automatically pulled from the Hiera datastore(s) and passed into the included module. This is pretty awesome. But it looks like included resources _only_ perform a hiera() lookup. If we have a hash defined in several levels of our
2013 Aug 23
1
Test the result of a hiera_hash() lookup
Hi folks, Is there a way to test the result of a hiera_hash() lookup in a manifest? I am trying to use hiera to do most of my configuration, like this for example: mysql::grants: ''user1@localhost'': privileges: - select_priv ''user2@localhost'': privileges: - select_priv - insert_priv - lock_tables_priv I have a wrapper
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 Apr 25
0
Custom hiera back-ends
So there''s this: http://docs.puppetlabs.com/hiera/1/custom_backends.html Is there a more thorough tutorial? That one''s a little … light. :-) -- Brian Lalor blalor@bravo5.org -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to
2012 Oct 04
5
Puppet caught TERM; calling stop - error
I''m running puppet on CentOS 6.3 x86_64: - facter.i386 1:1.6.12-2.el6 @puppet - puppet.noarch 2.7.19-1.el6 @puppet - ruby-shadow.x86_64 1.4.1-13.el6 @puppet Puppetmaster: - facter.x86_64 1:1.6.12-2.el6 @puppet - hiera.noarch 1.0.0-2.el6 @puppet - puppet.noarch 2.7.19-1.el6 @puppet -
2012 Jul 09
1
Custom ruby modules/classes, standard namespacing, pluginsync, etc.
still pretty new to Ruby, please bare with me :) Say I have a module with a custom type, structured like so: [modules]/mymodule/manifests/init.pp [modules]/mymodule/lib/puppet/provider/mytype/foo.rb [modules]/mymodule/lib/puppet/type/mytype.rb In foo.rb, I''d like to call some custom ruby functions in a module and/ or class. These are generic functions that may be used in other modules,
2012 Mar 02
9
zombie child process
Hi, This is the third or fourth time this happens. But puppetd gets a zombie shell childprocess and then never finishes the run. /opt/tc-puppet/bin/ruby /opt/tc-puppet/sbin/puppetd \_ [sh] <defunct> How do I begin looking on what can be wrong? This error has appeared on both 2.7.6 and 2.7.11. Regards, Elias -- You received this message because you are subscribed to the Google Groups
2012 Feb 11
10
Question about reusing classes/modules
Hello Everyone, I''m still pretty new with puppet so please bare with me. I tried searching and I''m pretty sure I''ve ready my answer but I''m not sure if I''m going down the right path just yet. My scenario is this: I have 4 environments, Dev, Test, QA, Prod. Each of these environments lives in 2 sites, LA and NY. I have 5 applications that are site and
2013 Jun 24
1
Deprecation notice on custom type?
Deprecation notice: Resource references should now be capitalized on line 101 in file /etc/puppet/manifests/templates/basenode.pp This is the specific line of code: realize (users::useraccount[hiera(''users'')]) When I capitalize Users, I get the following error: Error 400 on SERVER: Could not parse for environment production: Syntax error at
2013 Mar 19
1
User Groups (hadnling undefine groups)
I am trying to handle in my user class assigning user to groups, and handling that some groups might not be defined for that node. Example here is handling a non-datase node, "juser" fails with "Error: Failed to apply catalog: Parameter groups failed on User[juser]: Group names must not be empty. If you want to specify "no groups" pass an empty array" even in
2012 Oct 26
8
Puppet 3.0 rspec and custom resources
I am trying to figure out if I am missing something simple here. After upgrading to puppet 3.0 running puppet-rspec tests that use custom resources from modules in the fixtures directory are failing. I have a module that uses the anchor type and with 2.7.19 it works fine. After upgrading to 3.0 all of the tests are failing with Puppet::Error: Puppet::Parser::AST::Resource failed with
2012 Apr 11
4
Creating classes for individual nodes
This is more of a style question than implementation. I have a bunch of nodes running the same software but in many cases they need config files that are customized for that specific node. I was thinking I could push all the main files from the app through a central class and have separate classes for each individual node that has the config files. Is this the best way to do this or does it
2007 Sep 11
25
Re: #786: exported resources not refreshed
Hello all, what exactly is the "design decision" that is needed here? We currently have the problem that 0.23.2-3 (debian package) does not work when it comes to collecting exported resources. The resources are saved in the database, so picking them up is the problem (db is Mysql5.x). This is a major problem for us, since we are using this a lot for our monitoring services. I