Skip to content

Commit

Permalink
Merge pull request #198 from bastelfreak/params
Browse files Browse the repository at this point in the history
move static data from params.pp to init.pp
  • Loading branch information
bastelfreak authored Aug 6, 2024
2 parents 620db7f + b780823 commit 325b042
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
10 changes: 5 additions & 5 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Data type: `Boolean`
Boolean. If set to <tt>true</tt>, this module will use nfs version 4
for exporting and mounting nfs resources.

Default value: `$nfs::params::nfs_v4`
Default value: `false`

##### <a name="-nfs--nfs_v4_client"></a>`nfs_v4_client`

Expand All @@ -166,7 +166,7 @@ Boolean. If set to <tt>true</tt>, this module will use nfs version 4
for mounting nfs resources. If set to <tt>false</tt> it will use nfs
version 3 to mount nfs resources. It defaults to the setting of @param nfs_v4

Default value: `$nfs::params::nfs_v4`
Default value: `false`

##### <a name="-nfs--exports_file"></a>`exports_file`

Expand Down Expand Up @@ -395,7 +395,7 @@ Data type: `String`
String. It defines the location where nfs version 4 exports should be bindmounted to
on a server node. Defaults to <tt>/export</tt>.

Default value: `$nfs::params::nfs_v4_export_root`
Default value: `'/export'`

##### <a name="-nfs--nfs_v4_export_root_clients"></a>`nfs_v4_export_root_clients`

Expand All @@ -405,7 +405,7 @@ String. It defines the clients that are allowed to mount nfs version 4 exports a
includes the option string. Defaults to
<tt>*.${::domain}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)</tt>.

Default value: `$nfs::params::nfs_v4_export_root_clients`
Default value: `"*.${facts['networking']['domain']}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)"`

##### <a name="-nfs--nfs_v4_mount_root"></a>`nfs_v4_mount_root`

Expand All @@ -414,7 +414,7 @@ Data type: `String`
String. It defines the location where nfs version 4 clients find the mount root
on a server node. Defaults to <tt>/srv</tt>.

Default value: `$nfs::params::nfs_v4_mount_root`
Default value: `'/srv'`

##### <a name="-nfs--nfs_v4_idmap_domain"></a>`nfs_v4_idmap_domain`

Expand Down
12 changes: 6 additions & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
# @param nfs_v4_idmap_nobody_user
# String. 'Nobody-User' option for idmapd. Defaults to <tt>nobody</tt>.
# @param nfs_v4_idmap_nobody_group
# String. 'Nobody-Group' option for idmapd. Defaults to <tt>nobody</tt> or <tt>nogroup</tt>.
# String. 'Nobody-Group' option for idmapd. Defaults to <tt>nobody</tt> or <tt>nogroup</tt>.
# @param client_rpcbind_config
# String. It defines the location of the file with the rpcbind config.
# @param client_rpcbind_optname
Expand Down Expand Up @@ -169,8 +169,8 @@
Boolean $server_enabled = false,
Boolean $client_enabled = false,
Boolean $storeconfigs_enabled = true,
Boolean $nfs_v4 = $nfs::params::nfs_v4,
Boolean $nfs_v4_client = $nfs::params::nfs_v4,
Boolean $nfs_v4 = false,
Boolean $nfs_v4_client = false,
Stdlib::Absolutepath $exports_file = $nfs::params::exports_file,
Stdlib::Absolutepath $idmapd_file = $nfs::params::idmapd_file,
Optional[Stdlib::Absolutepath] $defaults_file = $nfs::params::defaults_file,
Expand Down Expand Up @@ -205,9 +205,9 @@
String $client_gssd_options = $nfs::params::client_gssd_options,
String $client_gssdopt_name = $nfs::params::client_gssdopt_name,
Boolean $client_d9_gssdopt_workaround = false,
String $nfs_v4_export_root = $nfs::params::nfs_v4_export_root,
String $nfs_v4_export_root_clients = $nfs::params::nfs_v4_export_root_clients,
String $nfs_v4_mount_root = $nfs::params::nfs_v4_mount_root,
String $nfs_v4_export_root = '/export',
String $nfs_v4_export_root_clients = "*.${facts['networking']['domain']}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)",
String $nfs_v4_mount_root = '/srv',
String $nfs_v4_idmap_domain = $nfs::params::nfs_v4_idmap_domain,
Variant[String, Array] $nfs_v4_idmap_localrealms = '', # lint:ignore:params_empty_string_assignment
Integer $nfs_v4_idmap_cache = 0,
Expand Down
5 changes: 0 additions & 5 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
class nfs::params {
#### Default values for the parameters of the main module class, init.pp

$nfs_v4 = false
$nfs_v4_export_root = '/export'
$nfs_v4_export_root_clients = "*.${facts['networking']['domain']}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)"
$nfs_v4_mount_root = '/srv'

if $facts['networking']['domain'] != undef {
$nfs_v4_idmap_domain = $facts['networking']['domain']
} else {
Expand Down

0 comments on commit 325b042

Please sign in to comment.