similar to: Ruby DSL parameterized classes and defaults

Displaying 20 results from an estimated 100 matches similar to: "Ruby DSL parameterized classes and defaults"

2012 Feb 08
11
define hostclass with special characters
Hi, I need to define the hostclass with special character for ex: "swift::proxy-ring" I have tried following ways but not worked: 1) hostclass :swift::proxy-ring do 2) hostclass ''swift::proxy-ring'' do 3) hostclass "swift::proxy-ring" do When I am using the 2 and 3 options it is giving following erroe: undefined method `[]'' for Class:Class at
2010 Dec 09
1
Calling class defines in pure ruby DSL
Let''s say I have a define in class ''foo'' called ''foo::bar'': define foo::bar ($var1, $var2) { ... } Then I have a ruby hostclass hostclass :foo do ... } I see I can successfully set the parameters by doing: environment.known_resource_types.definitions[''foo::bar''].set_arguments :var1 => ''val1'', :var2 =>
2010 Jul 22
9
First Foray into Parameterized Classes.... not so good
I have this: class foo::foobar ($version) { } which is called like this: class facility::sanjose inherits facility::common { class { foo::foobar: version => "1.3.13" } } puppet complains with this on the client: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find parent resource type ''facility::sanjose'' of type hostclass in
2010 Dec 10
3
Re: [Puppet-dev] Converting to Ruby DSL
On Dec 8, 2010, at 11:09 AM, Ken Barber wrote: > (cross posting here as I originally posted in puppet-users - I figure the question is more of a dev one then for puppet-users) > > Hi everyone, > > I''m experimenting with converting some of my live puppet content to > Ruby DSL and have found a few gaps I wouldn''t mind some advice on. I''m > not sure
2011 Aug 11
6
need urgent help with including Ruby DSL class from puppet manifests
Hi, I have a Ruby class in "nagios" module - it''s located in nagios/ manifests/ssa_nagios_checks.rb and looks like this hostclass :ssa_nagios_checks do ... end In nagios/manifests/init.pp I have class nagios::server { ... include ssa_nagios_checks ... } And I get the following error .... debug: importing ''/etc/puppet/modules/nagios/manifests/
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 Jul 12
15
How can I list classes available on the puppet master?
Is there a way to get a list of all the classes available from the puppet master? I have 2 goals for this - one is documentation in a human readable form, and the other is potentially importing that data into dashboard. I did find some info on the rest API (http://docs.puppetlabs.com/guides/rest_api.html#resource-types ) but I can''t make any sense of the output from it. Thanks.
2011 Mar 23
1
Ruby DSL: create_resource with exec
Hi! How to create "exec" resource in ruby DSL? Found mention of create_resource but had no luck in using it =( -- 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 puppet-users+unsubscribe@googlegroups.com. For more
2012 May 22
0
How to define class inheritance with Puppet Ruby DSL
I have a module "Ruby": # init.pp class ruby { package { ''libldap-ruby1.8'': ensure => ''installed'' } } Then I have a manifest written with Ruby-DSL, which should inherit this module: # ldap.rb hostclass ''ruby::ldap'' do (...) end How do I define that *ruby::ldap* inherits *ruby*? -- You received this message because
2010 Jul 12
13
ANNOUNCE: Puppet 2.6.0 - Release Candidate 2 available!
Welcome back again to the Puppet release cycle with the long-awaited eleventy times better RC2 release. The 2.6.0 release is a major feature release and includes a huge variety of new features, fixes, updates and enhancements. These include the complete cut-over from XMLRPC to the REST API, numerous language enhancements, a complete rewrite of the events and reporting system, an internal Ruby
2013 Mar 06
0
"Cannot find definition Class" and "Could not find class" hiccups after manifest/module update - once for every agent
We use puppet with two environments: [main] and [development]. These environments have different locations for their puppet manifests and modules (see puppet.conf below). Whenever I change/update a file in the directories belonging to the “main” environment, puppetmaster notices these changes and reacts to them w/o any hiccups. In contrast to this – if I change/touch a file in a directory
2011 Aug 11
0
parameterized class precedences
Hello, I want to access variable of a parameterized class but it fails with "class has not been evaluated". Tried to evaluate it first adding stages and requires, but still same. I''ll explain better with an example: stage { pre: before => Stage[main] } class directory($path) { file { $path: ensure => directory, } } class directory::subdirectory { file {
2008 Apr 03
1
How to ask for *fixed* number of distributions under parameterized Gaussian mixture model.
Dear R users: I am wondering how to ask for *fixed* number of distributions under parameterized Gaussian mixture model. I know that em() and some related functions can predict the parameterized Gaussian mixture model. However, there seems no parameter to decide number of distributions to be mixed (if we known the value in advance). That is, assume I know the (mixed)data is from 3 different
2007 Jan 20
2
find_by_sql with named parameterized sql
I tried to use named parameters in my SQL query , using find_by_sql Order.find_by_sql ([select * from orders where amount > ? and quantity > ?", [ @amount, @quantity ] works;.. but Order.find_by_sql ([select * from orders where amount > :amount and quantity > :quantity ", [ :amount => @amt, :quantity => @qty ] is not working a I wrong or should I use a plain select
2011 Feb 22
1
ANNOUNCE: Puppet 2.6.5 - Release Candidate 5 available!
We''re back with a maintenance release: 2.6.5. This release addresses a number of bugs in the 2.6.x branch and adds a handful of features and documentation updates. This release candidate contains fixes for bugs identified in the previous release candidates: - rc1 caused a warning on Ruby 1.8.6 which could cause log pollution. This release candidate no longer generates the warning. - rc1
2010 Feb 11
3
Parameterized ActiveRecord Associations: Any such thing?
Hi list, how are ya? So, my current project is just begging for the ability to have parameterized associations in my ActiveRecord classes. Basically I need something that is a cross between named scopes and standard associations (has_many specifically). I''m wondering if such a thing exists or, if not, if anyone else has an elegant, equivalent solution? Example: class Sprocket <
2011 Sep 21
2
Two parameterized classes calling both a thirth class (results in already defined)
Hi all, I have three parameterized classes, named mq, mq_gsk and apache. The mq class always calls the mq_gsk class, but the apache class should only call the mq_gsk class when the mq class is not used in a hosts'' node definition Here is my configuration class mq ( $gsk_version = undef ) { require mq::params < ..... > class { ''mq_gsk'':
2010 Dec 09
10
Invalid parameter when assigning parameterized class to a node
Hello, I searched through the archive of the google group but did not found any solution or hint for my problem. I want to assign the following parameterized class to a node. class httpd($certMail, $certOU) { ... } This is the node statement to assign the class to a node. node "someserver" inherits basenode { class { httpd: certEMail =>
2011 Feb 04
1
ANNOUNCE: Puppet 2.6.5 - Release Candidate 1 available!
We''re back with a maintenance release: 2.6.5. This release addresses a number of bugs in the 2.6.x branch. 2.6.5 is a maintenance release in the 2.6.x branch and it contains only bug fixes, documentation updates and a small handful of features. The first release candidate is available for download at: http://puppetlabs.com/downloads/puppet/puppet-2.6.5-rc1.tar.gz We''re
2011 Feb 04
2
Fwd: [Puppet-dev] ANNOUNCE: Puppet 2.6.5 - Release Candidate 1 available!
----- Forwarded message from Nick Lewis <nick@puppetlabs.com> ----- Date: Thu, 3 Feb 2011 21:59:10 -0800 From: Nick Lewis <nick@puppetlabs.com> To: puppet-users@googlegroups.com, puppet-dev@googlegroups.com Subject: [Puppet-dev] ANNOUNCE: Puppet 2.6.5 - Release Candidate 1 available! Message-ID: <AANLkTikjFwZ98P_NcxF54zHbU2mJf15XDrLg2cMp2GWT@mail.gmail.com> We''re back