|
I noticed this issue inside the puppetlabs-firewall module, however the situation is probably relevant to many other modules as well.
If I have the following manifest:
class {'firewall':}
|
resources {'firewall': purge=>true}
|
I get the following error, as the firewall class isn't being executed first:
# /opt/puppetlabs/bin/puppet apply site.pp
|
Notice: Compiled catalog for ja35cpxhttwrv7e.delivery.puppetlabs.net in environment production in 0.76 seconds
|
Error: /Stage[main]/Main/Resources[firewall]: Failed to generate additional resources using 'generate': Command iptables_save is missing
|
Notice: /Stage[main]/Firewall::Linux/Package[iptables]/ensure: created
|
Notice: /Stage[main]/Firewall::Linux::Debian/Package[iptables-persistent]/ensure: created
|
Notice: Applied catalog in 2.66 seconds
|
The firewall class should be executed first as the firewall types (that are generated by the 'resources' metatype) has an autorequire on Package['iptables'] (which is inside the firewall class), however the autorequire isn't being executed.
Naturally, this works the second time around, as the iptables package has been installed on the system.
|