Skip to content

Instantly share code, notes, and snippets.

@cwebberOps
Created October 9, 2012 14:26
Show Gist options
  • Save cwebberOps/3859157 to your computer and use it in GitHub Desktop.
Save cwebberOps/3859157 to your computer and use it in GitHub Desktop.
join the join
define storage::cluster_export ($legacy = false) {
if $legacy {
$nfs = join([
join($storage::params::cluster_opts, ','),
',rw=', join($storage::params::cluster_rw, ':'), ':', join($storage::params::legacy_rw, ':'),
',root=', join($storage::params::cluster_rw, ':'), ':', join($storage::params::legacy_rw, ':'),
',ro=', join($storage::params::cluster_ro, ':'), ':', join($storage::params::legacy_ro, ':'),
], '')
} else {
$nfs = join([
join($storage::params::cluster_opts, ','),
',rw=', join($storage::params::cluster_rw, ':'),
',root=', join($storage::params::cluster_rw, ':'),
',ro=', join($storage::params::cluster_ro, ':'),
], '')
}
zfs {$name:
sharenfs => $nfs
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment