-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the option to create the exported directory automatically
- Loading branch information
Showing
5 changed files
with
87 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,13 +15,17 @@ | |
# @param mode | ||
# Sets the permissions of the exported directory. | ||
# | ||
# @param manage_dir | ||
# Whether or not to manage the directory to be exported. | ||
# | ||
# @author | ||
# * Daniel Klockenkaemper <[email protected]> | ||
# * Martin Alfke <[email protected]> | ||
# | ||
define nfs::functions::create_export ( | ||
Variant[String[1], Array[String[1]]] $clients, | ||
String[1] $ensure = 'present', | ||
Boolean $manage_dir = true, | ||
Optional[String[1]] $owner = undef, | ||
Optional[String[1]] $group = undef, | ||
Optional[String[1]] $mode = undef, | ||
|
@@ -34,13 +38,17 @@ | |
content => $line, | ||
} | ||
|
||
# Create the directory path only if a File resource isn't | ||
# defined previously AND the $manage_dir boolean is true. | ||
unless defined(File[$name]) { | ||
file { $name: | ||
ensure => directory, | ||
owner => $owner, | ||
group => $group, | ||
mode => $mode, | ||
selinux_ignore_defaults => true, | ||
if $manage_dir { | ||
file { $name: | ||
ensure => directory, | ||
owner => $owner, | ||
group => $group, | ||
mode => $mode, | ||
selinux_ignore_defaults => true, | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters