similar to: Re: [Puppet-dev] Converting to Ruby DSL

Displaying 20 results from an estimated 30000 matches similar to: "Re: [Puppet-dev] Converting to Ruby DSL"

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
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/
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 Jul 05
1
Ruby DSL parameterized classes and defaults
I''ve been reading the Docs on this, and its not very clear. I want to have a parameterized class that takes arrays and objects as parameters. I''m using puppet 2.6.16. I define a hostclass like this: hostclass :test, :arguments => { :param1 => "blah" } do end I call from Puppet DSL: class {"test": } I get this as an error: err: Could not
2012 Aug 17
5
Hiera, Hashes, and Create_resources
Howdy: I need some help please to get hiera configuration data derived from YAML, thru puppet. I have studied Internet search results and puppet documentation on create_resources and custom defines but need a little help along. I can print out the YAML from variables, arrays, and, finally, hashes too from a puppet manifest. One thing that is stumping me is how to access from the custom define
2010 Dec 14
11
Configure firewall with Puppet
Hello Everybody, We need to open some ports on the target machine, let''s say 694:udp and 3306:tcp I couldn''t find any documentation how can I do this with Puppet. What the best way of doing this? Thank you Dmytro -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to
2011 Mar 23
1
way of importing .pp file or some string that contain class definition in ruby dsl
I''m finding the way to import a file or a class stored in string in ruby manifest. I have tried following code to parse the class having packages and services. pp = Puppet::Parser::Parser.new("development") pp.string = "class webhttpd{package { ''httpd'': ensure => installed, } service { ''httpd'': ensure => running, enable =>
2011 Aug 17
3
Using back-ported create_resources in 2.6.x
Does anyone have some examples of using this create_resources function, https://github.com/puppetlabs/puppetlabs-create_resources, ? Based on the README example I can''t figure out exactly how to change from using defines to using this function. Maybe I misunderstand the purpose of create_resources...is it to replace defines, or is it to allow ENCs (for example) to use a define? Below
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
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.
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 =>
2013 Jan 27
5
Extending a standard type
I''m trying to extend the standard ''user'' type to add maintenance of some of the contents of a user''s home directory, and I''m trying to avoid creating an entirely new custom type if I can. The approach I''m taking is to create a site::user defined type which in turns calls the standard user type. I''m having a problem figuring out
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 May 13
2
Creating defined resources based on array of parameters.
Hi all, With the goal of making my code a little more DRY, I am trying to define resource parameters in an array of hashes, and then create defined resources from these array items. I am having trouble figuring out the syntax for accessing the hash values for the hash currently being worked on ("self?"). Here''s the code to make it clear: ##### Configuration arguments
2011 Mar 04
3
Puppet dsl
Is the puppet dsl a complete Turing capable language? As I understand it, the chain is dsl -> compiled thing -> actions. What language is the compiled thing in? Ruby? -- 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
2012 Oct 26
12
Have Class Only Perform Actions When There Is Work To Do (i.e. Making Them Idempotent)
Howdy. I feel like I am missing something really simply with regards to the way that Puppet works and I am wondering if someone can point me in the write direction. I have written a class that downloads, uncompresses, compiles, and installs Python from source. So far so good. The problem is that it only needs to do this once, when Python is not already in place (or some other custom
2010 Nov 16
3
Can't do a nested define. What are my options?
I''m trying to create a directory structure from 2 arrays. First array is the "outter", second is the "inner". For each "outter", I''d like to loop through each "inner". Below is sort of what I''m trying to do. In the real world, the $sys_name and $mounts vars will be parsed from yaml and will be dynamic. In the example I''ve
2013 Apr 19
12
How to pass puppet/hiera veriable to external script ? Do I need to ?
Hi, I have a problem with running puppet with hiera based data. I am trying to cleanup user accounts on a range of servers (to have the same uid/gid). When I create existing account but with different uid/gid it doesn''t change files group ownership so I need to run a script which cleanups after cleanup ;-) I use the following code: --- :backends: - yaml :hierarchy: -
2013 Dec 13
3
Resource ordering only using Hiera?
Hello, I''m trying to come up with a generic wrapper class for use with hiera so that I can have a service that is completely managed and configured via hiera and its own puppet module to be notified by Puppet of changes to a file or other resource managed by a different class/module. The example I''m using here is the management of /etc/security/limits.conf for a service account
2012 Mar 30
2
Does create_resources support virtual resources?
Hi all, I''m interested pushing my user list out of my users manifest and into Hiera. Unfortunately I haven''t been able to get it to work the way I thought it would. The error suggests that perhaps create_resources cannot create virtual resources, but the docs I''ve read so far don''t address it. The class (in init.pp): class users { $system_users =