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?
Thanks,
Jonathan
--
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.