diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-03-10 17:05:19 -0800 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-03-10 17:05:19 -0800 |
| commit | b40021ba4bb1bc328abd54eb2eb7cae7ee82f7cf (patch) | |
| tree | 0930a8790d0c103c347d8a7aa5386cfa9de7a51d /lib | |
| parent | 6ff2e5cd775c5802113d27f85ed518e25365d563 (diff) | |
| parent | 1a55c7a4c225dc022fa640bf46f7bc940013151d (diff) | |
| download | puppet-b40021ba4bb1bc328abd54eb2eb7cae7ee82f7cf.tar.gz puppet-b40021ba4bb1bc328abd54eb2eb7cae7ee82f7cf.tar.xz puppet-b40021ba4bb1bc328abd54eb2eb7cae7ee82f7cf.zip | |
Merge branch 'feature/next/5479-add-autorequire-for-solaris-zone-dataset' into next
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/type/zone.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/puppet/type/zone.rb b/lib/puppet/type/zone.rb index fc524a541..c7c2aa143 100644 --- a/lib/puppet/type/zone.rb +++ b/lib/puppet/type/zone.rb @@ -413,6 +413,23 @@ Puppet::Type.newtype(:zone) do end end + # If Puppet is also managing the zfs filesystem which is the zone dataset + # then list it as a prerequisite. Zpool's get autorequired by the zfs + # type. We just need to autorequire the dataset zfs itself as the zfs type + # will autorequire all of the zfs parents and zpool. + autorequire(:zfs) do + + # Check if we have datasets in our zone configuration + if @parameters.include? :dataset + reqs = [] + # Autorequire each dataset + self[:dataset].each { |value| + reqs << value + } + reqs + end + end + def validate_ip(ip, name) IPAddr.new(ip) if ip rescue ArgumentError |
