On 11/14/2012 9:30 AM, Jonathan Gazeley wrote:
I've written a defined type for firewall rules, to abstract it out from the OS, like so:define firewall ($source, $port, $proto) { case $operatingsystem { /Centos|Fedora|Scientific|Debian/: { iptables { $title: proto => $proto, dport => $port, source => $source, jump => "ACCEPT", } } /Ubuntu/: { ufw::allow { $title: port => $port, from => $source, proto => $proto, } } } } But when I try to call upon this resource, like this: firewall { 'test-rule': source => '123.123.123.123', port => '12345', proto => 'udp', } The puppet agent throws this error: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type firewallrule at /etc/puppet/manifests/nodes.pp:74 It seems that my "define" isn't working, but the puppet master log doesn't reveal any more detail than the agent. Any ideas what's up?
Puppet can have problems showing you the error depending on where it is. "Invalid resource type firewallrule" makes me think it's in one of the defines further along the chain. I'd try the iptable or ufw define your firewall define is creating directly on the node in question and make sure that works.
Ramin -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
