Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Add basic hiera support (Was #36) #37

Merged
merged 1 commit into from
Sep 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,19 @@ Export root, where we bind mount shares, default /export
Domain setting for idmapd, must be the same across server
and clients. Default is to use $domain fact.

#####`hiera_exports` (optional)

If set, the hiera variable nfs::server::exports will be used to
construct nfs::server::export resources

```hiera
nfs::server::hiera_exports: true
nfs::server::exports:
/mnt/something:
ensure: mounted
clients: '*(fsid=0,ro,insecure,async,all_squash,no_subtree_check,mountpoint=/mnt/something)'
```

#####Examples

```puppet
Expand Down
9 changes: 8 additions & 1 deletion manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
$nfs_v4_root_export_tag = undef,
#
$mountd_port = undef,
$mountd_threads = 1
$mountd_threads = 1,
#
$hiera_exports = false
) inherits nfs::params {

class { "nfs::server::${::nfs::params::osfamily}":
Expand All @@ -55,4 +57,9 @@

include nfs::server::configure

if $hiera_exports {
$exports = hiera_hash('nfs::server::exports')
create_resources(nfs::server::export, $exports)
}

}