[Puppet Users] Code coverage for puppet resources

2014-01-26 Thread Gareth Rushgrove
For anyone else who likes writing tests for their puppet manifests, I've just added basic code coverage to rspec-puppet: A blog post here about how to use it: http://www.morethanseven.net/2014/01/25/code-coverage-for-puppet-modules/ I'd be interested in any feedback on how to improve or add to

[Puppet Users] Hash and loops

2014-01-26 Thread Thomas Bendler
Hi @all, I try to pass a hash to a module class like this: class { 'modulename': filecontent = { name1 = 'value1', name2 = 'value2', ... namex = 'valuex', } } ​The class should take the hash list, loop over the list and create i.e. file resources with namex and content

[Puppet Users] Hash and loops

2014-01-26 Thread Jose Luis Ledesma
Hello, You should look the create_resources: http://docs.puppetlabs.com/references/latest/function.html#createresources Regards, -- 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,

[Puppet Users] Re: Composite namevars for custom Type

2014-01-26 Thread badgerious
Len, I tried out your code, and it looks good (the resource in the puppet manifest doesn't conform to the title pattern format, which causes a different error, but the title_patterns method itself is being recognized). I'd try restarting the puppetmaster. I've found this to be necessary when

[Puppet Users] Problem with puppetlabs-firewall and ip range

2014-01-26 Thread Louis Coilliot
Hello, I use puppetlabs-firewall 0.4.2 I have some rules : firewall { '138 jboss node to node udp' : chain = 'INPUT', proto = 'udp', src_range = $jboss7::params::ip_range, dst_range = $jboss7::params::ip_range, action = 'accept',

[Puppet Users] Puppet Custom Types, the easy way

2014-01-26 Thread bert hajee
We have written a library to make it easier to build Puppet Custom Types. Check out our first blog post http://bit.ly/1iAg1Yx introducing easy_typehttps://github.com/hajee/easy_type. I'm really curious if this fits the needs of any Puppet developers out there. Please let me know if you like

[Puppet Users] Module ordering in nodes.pp

2014-01-26 Thread Sam Rajagopal
I have nodes.pp defined as follows node abc.x.com, 123.x.com { include module1 include module2 include module3 } Very simple definition. No parameterization, no scoping etc When I run puppet agent -t on the agent, I see the execution jumping to module 3 after module 1. Not sure how I can do

[Puppet Users] Module ordering in nodes.pp

2014-01-26 Thread Jose Luis Ledesma
You have to make use of chaining arrows in order to establish a dependency. http://docs.puppetlabs.com/puppet/3/reference/lang_relationships.html#chaining-arrows Regards, -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this