Hi
I'm probably doing something horribly wrong. I can sense it, but it hasn't properly kicked in yet...
I'm trying to create a module for iptables. This is to make servers that have similar purpose, have the same flrewall configuration.
I created the modules/iptables/{manifests,files,templates} structure, Iike I have for a few modules I have been able to put together.
For some reason puppet claims not to see the iptables:::config class, which I have tried to setup in multiple ways, using regexes.
Configuration is like so:
class iptables::config {
## servers with "host" in their name
if $hostname =~ /\w*host+(.*)/ {
## iptables config file
file { "/etc/sysconfig/iptables":
ensure => present,
source => "puppet://puppet/modules/iptables/iptables.vmhosts",
mode => 0600,
require => Class["iptables::install"],
notify => Class["iptables::service"],
}
}
## (Anything with "qtm" in its hostname )
elsif $hostname =~ /\S*qtm\D+(.*)/ {
## iptables config file
file { "/etc/sysconfig/iptables":
ensure => present,
source => "puppet://puppet/modules/iptables/iptables.qtm",
mode => 0600,
require => Class["iptables::install"],
notify => Class["iptables::service"],
}
}
.......snip...
else {
##The others are custom jobs ( ) so they cant be grouped so easy.
## Working on that...
warning("Coming soon for $hostname")
}
}
The agents all cry "Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class iptables::config for myname on node me"
Please can some kind person show a poor little beginner what I am doing wrong?
Thanks!