Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create define - nfs::export #1

Closed
ghoneycutt opened this issue May 30, 2013 · 6 comments
Closed

create define - nfs::export #1

ghoneycutt opened this issue May 30, 2013 · 6 comments

Comments

@ghoneycutt
Copy link
Owner

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

@ghoneycutt
Copy link
Owner Author

@noppe is taking this on

@Wildcarde
Copy link

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?

@ghoneycutt
Copy link
Owner Author

@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.

@Wildcarde
Copy link

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?

@ghoneycutt
Copy link
Owner Author

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.

@ghoneycutt
Copy link
Owner Author

Decided to use file_line instead as of V2 in PR #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants