3

I'm trying to implement the recipe found here https://github.com/puppetlabs/puppetlabs-firewall#readme and I appear to be making a rookie puppet mistake I can't see. I have a module called mwsettings which itself can be found okay (the mwsettings/init.pp stores a helper for loading some templates and that works), but the following code in my site.pp

Firewall {
  notify  => Exec['persist-firewall'],
  before  => Class['mwsettings::postfirewall'],
  require => Class['mwsettings::prefirewall'],
}

Blows up with

Error: Failed to apply catalog: Could not find dependency Class[Mwsettings::Prefirewall] for Firewall[100 accept mysql - XXXXXXXX]

when my code later in site.pp invokes

firewall { "100 accept mysql - $name":
    proto => 'tcp',
    action => 'accept',
    dport => 3306,
    source => $name,
}

But, it appears I have the manifest set up properly for prefirewall:

# cat modules/mwsettings/manifests/prefirewall.pp 
class mwsettings::prefirewall {
  Firewall {
    require => undef,
  }
<snip>

Am I missing something incredibly trivial here? Since it's my first rodeo with puppet, I'm not even entirely sure how to debug this.

Thanks!

4

1 に答える 1

7

宣言していないクラスを参照しています。

これを追加すると、動作するはずです:

include mwsettings::prefirewall

include mwsettings::postfirewall
于 2012-12-12T21:53:06.420 に答える