Created
December 28, 2010 01:32
-
-
Save lak/756769 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Puppet::Type.newtype(:iptables) do | |
| ... | |
| def generate | |
| self.class.new(:name => "last") | |
| end | |
| def autorequire(:iptables) | |
| return unless name == "last" | |
| self.catalog.resources.collect { |r| r.type == :iptables } | |
| end | |
| # In provider: | |
| def flush | |
| return unless name == "last" | |
| # write file out | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment