Skip to content
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
9 changes: 0 additions & 9 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,6 @@ The following parameters are available in the `nfs::client::mount` defined type:
* [`mount_root`](#-nfs--client--mount--mount_root)
* [`umask`](#-nfs--client--mount--umask)
* [`mount`](#-nfs--client--mount--mount)
* [`fstype`](#-nfs--client--mount--fstype)
* [`manage_packages`](#-nfs--client--mount--manage_packages)
* [`client_packages`](#-nfs--client--mount--client_packages)
* [`nfs_v4`](#-nfs--client--mount--nfs_v4)
Expand Down Expand Up @@ -921,14 +920,6 @@ Data type: `String[1]`

Default value: `$title`

##### <a name="-nfs--client--mount--fstype"></a>`fstype`

Data type: `String[1]`

Set 'fstype' for the mount

Default value: `$nfs::client_nfsv4_fstype`

##### <a name="-nfs--client--mount--manage_packages"></a>`manage_packages`

Data type: `Boolean`
Expand Down
7 changes: 2 additions & 5 deletions manifests/client/mount.pp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
# Set umask for mount directory creation.
#
# @param mount
# @param fstype
# Set 'fstype' for the mount
# @param manage_packages
# @param client_packages
# @param nfs_v4
Expand All @@ -74,7 +72,6 @@
String[1] $server,
Optional[String[1]] $share = undef,
String[1] $ensure = 'mounted',
String[1] $fstype = $nfs::client_nfsv4_fstype,
String[1] $mount = $title,
Boolean $remounts = false,
Boolean $atboot = false,
Expand Down Expand Up @@ -118,7 +115,7 @@
mount { "shared ${sharename} by ${server} on ${mount}":
ensure => $ensure,
device => "${server}:${sharename}",
fstype => $fstype,
fstype => $nfs::client_nfsv4_fstype,
name => $mount,
options => $options_nfsv4,
remounts => $remounts,
Expand Down Expand Up @@ -146,7 +143,7 @@
mount { "shared ${sharename} by ${server} on ${mount}":
ensure => $ensure,
device => "${server}:${sharename}",
fstype => $fstype,
fstype => $nfs::client_nfs_fstype,
name => $mount,
options => $options_nfs,
remounts => $remounts,
Expand Down
28 changes: 4 additions & 24 deletions spec/defines/client_mount_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
it { is_expected.to contain_nfs__functions__mkdir('/srv/test') }

it do
is_expected.to contain_mount('shared /test by 1.2.3.4 on /srv/test').with(fstype: 'nfs4').that_requires(
is_expected.to contain_mount('shared /test by 1.2.3.4 on /srv/test').that_requires(
[
'Nfs::Functions::Mkdir[/srv/test]',
] + client_packages,
Expand All @@ -90,7 +90,7 @@
it { is_expected.to contain_mount('shared /test by 1.2.3.4 on /srv/test') }

it do
is_expected.to contain_mount('shared /test by 1.2.3.4 on /srv/test').with(fstype: 'nfs4').that_requires(
is_expected.to contain_mount('shared /test by 1.2.3.4 on /srv/test').that_requires(
[
'Nfs::Functions::Mkdir[/srv/test]',
] + client_packages,
Expand All @@ -108,7 +108,7 @@
it { is_expected.to contain_nfs__functions__mkdir('/opt/sample') }

it do
is_expected.to contain_mount('shared /test by 1.2.3.4 on /opt/sample').with(fstype: 'nfs4').that_requires(
is_expected.to contain_mount('shared /test by 1.2.3.4 on /opt/sample').that_requires(
[
'Nfs::Functions::Mkdir[/opt/sample]',
] + client_packages,
Expand All @@ -126,7 +126,7 @@
it { is_expected.to contain_nfs__functions__mkdir('/opt/sample') }

it do
is_expected.to contain_mount('shared /test by 1.2.3.4 on /opt/sample').with(fstype: 'nfs4').that_requires(
is_expected.to contain_mount('shared /test by 1.2.3.4 on /opt/sample').that_requires(
[
'Nfs::Functions::Mkdir[/opt/sample]',
],
Expand All @@ -153,26 +153,6 @@
)
end
end

context 'when nfs_v4 => false, fstype set' do
let(:title) { '/srv/test' }

let(:pre_condition) { 'class { "nfs": client_enabled => true }' }

let(:params) { { server: '1.2.3.4', fstype: 'nfs' } }

it { is_expected.to contain_nfs__functions__mkdir('/srv/test') }

it { is_expected.to contain_exec('mkdir_recurse_/srv/test').with(command: 'mkdir -p /srv/test') }

it do
is_expected.to contain_mount('shared /srv/test by 1.2.3.4 on /srv/test').with(fstype: 'nfs').that_requires(
[
'Nfs::Functions::Mkdir[/srv/test]',
] + client_packages,
)
end
end
end
end
end
Loading