Sha256: 93736dfd37fe524127260b4d5bdba20c98d9db81605fd6f0b24379f6d2384a06

Contents?: true

Size: 1.33 KB

Versions: 12

Compression:

Stored size: 1.33 KB

Contents

module Puppet
  newtype(:zfs) do
    @doc = "Manage zfs. Create destroy and set properties on zfs instances.

**Autorequires:** If Puppet is managing the zpool at the root of this zfs instance, the zfs resource will autorequire it. If Puppet is managing any parent zfs instances, the zfs resource will autorequire them."

    ensurable

    newparam(:name) do
      desc "The full name for this filesystem. (including the zpool)"
    end

    newproperty(:mountpoint) do
      desc "The mountpoint property."
    end

    newproperty(:compression) do
      desc "The compression property."
    end

    newproperty(:copies) do
      desc "The copies property."
    end

    newproperty(:quota) do
      desc "The quota property."
    end

    newproperty(:reservation) do
      desc "The reservation property."
    end

    newproperty(:sharenfs) do
      desc "The sharenfs property."
    end

    newproperty(:snapdir) do
      desc "The snapdir property."
    end

    autorequire(:zpool) do
      #strip the zpool off the zfs name and autorequire it
      [@parameters[:name].value.split('/')[0]]
    end

    autorequire(:zfs) do
      #slice and dice, we want all the zfs before this one
      names = @parameters[:name].value.split('/')
      names.slice(1..-2).inject([]) { |a,v| a << "#{a.last}/#{v}" }.collect { |fs| names[0] + fs }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
puppet-2.6.18 lib/puppet/type/zfs.rb
puppet-2.6.17 lib/puppet/type/zfs.rb
puppet-2.6.16 lib/puppet/type/zfs.rb
puppet-2.6.15 lib/puppet/type/zfs.rb
puppet-2.6.14 lib/puppet/type/zfs.rb
puppet-2.6.13 lib/puppet/type/zfs.rb
puppet-2.6.12 lib/puppet/type/zfs.rb
puppet-2.6.11 lib/puppet/type/zfs.rb
puppet-2.6.10 lib/puppet/type/zfs.rb
puppet-2.6.9 lib/puppet/type/zfs.rb
puppet-2.6.8 lib/puppet/type/zfs.rb
puppet-2.6.7 lib/puppet/type/zfs.rb