No description, website, or topics provided.
Ruby Puppet
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
manifests
spec
tests
CHANGELOG
CONTRIBUTING.md
CONTRIBUTORS
Gemfile
Gemfile.lock
Guardfile
LICENSE
Modulefile
README.markdown
Rakefile

README.markdown

Overview

This module makes it easy to manage ZFS filesystems and their mountpoints.

See blog post for details: Zfsdir: Simple ZFS management with Puppet

Usage

zfsdir { 'rpool/test':
    ensure => 'present',
    zfs    => {
        recordsize  => '16K',
        mountpoint  => "/test",
        compression => "on",
    },
    file   => {
        owner => 'mzach',
        group => 'bin'
    },
}

For use with hiera, one could define a nested hash in the following form (e.g. in YAML):

---
zfsdirs:
  rpool/testfs:
    zfs:
      recordsize: 8K
      mountpoint: /testfs
      compression: "on"
    file:
      owner: nobody
      group: bin
  rpool/test2
    zfs:
      mountpoint: /test2
    file:
      mode: 0777

The resources are constructed with the create_resources function from hiera:

$zfsdirs = hiera_hash('zfsdirs',{})
create_resources(zfsdir, $zfsdirs)

Reference

  • zfs resource type
  • file resource type

Limitations

Tested on:

  • Solaris 11

TODO

  • More tests
  • Deal with file-user dependency
  • Make module ready for Puppet Forge