create define - nfs::export
ghoneycutt opened this issue · comments
We need a define that ensures entries in /etc/exports
something like
define nfs::export ( $local_path, $remotes, $options = 'ro', ) { ... }
You could then write the nfs::export info as a hash and use create_resources()
see examples at
https://github.com/ghoneycutt/puppet-module-common/blob/master/manifests/init.pp#L365
http://docs.puppetlabs.com/references/latest/function.html#createresources
@noppe is taking this on
Was this ever completed? Would it be easier to make this a simple erb template where the hashes are used to generate a line each?
@Wildcarde would prefer to use the method originally listed because it still allows you to specify exports as a hash, but gives you the added benefit of being able to validate each of the parameters. We want to validate the params in the manifest instead of the ERB, so that we can fail() the compilation of the catalog if needed.
That's fair, have you looked into using the export.d directory to handle writing exports out instead of what would presumably be an augeus implemented resource?
I have not as I do not think it is very portable, since this module supports a bunch of OS's. We could use file_line from stdlib though.
Decided to use file_line instead as of V2 in PR #78