Skip to content

Commit

Permalink
Merge pull request #212 from capsi-informatique/master
Browse files Browse the repository at this point in the history
Rework documentation into Puppet Strings format
  • Loading branch information
kenyon authored Dec 18, 2024
2 parents 8f67adc + ef0ec4c commit a77b94a
Show file tree
Hide file tree
Showing 17 changed files with 416 additions and 571 deletions.
440 changes: 160 additions & 280 deletions REFERENCE.md

Large diffs are not rendered by default.

29 changes: 14 additions & 15 deletions manifests/client.pp
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# Class: nfs::client
# @summary Manage the NFS client
#
# @summary
# This class exists to
# 1. order the loading of classes
# 2. including all needed classes for nfs as a client
# This class exists to:
# 1. Order the loading of classes,
# 2. Including all needed classes for NFS as a client.
#
# @param ensure
# The ensure parameter is used to determine if the nfs client should be configured
# and running or not. Valid values are 'present' and 'absent'. Default is 'present'.
# The ensure parameter is used to determine if the NFS client should be configured and running or not.
#
# @param nfs_v4
# The nfs_v4 parameter is used to determine if the nfs client should use nfs version 4.
# Valid values are 'true' and 'false'. Default is 'false'.
# The nfs_v4 parameter is used to determine if the NFS client should use NFS version 4.
#
# @param nfs_v4_mount_root
# The nfs_v4_mount_root parameter is used to determine the root directory for nfs version 4 mounts.
# Default is '/mnt'.
# The nfs_v4_mount_root parameter is used to determine the root directory for NFS version 4 mounts.
#
# @param nfs_v4_idmap_domain
# The nfs_v4_idmap_domain parameter is used to determine the domain for nfs version 4 id mapping.
# Default is 'localdomain'.
# The nfs_v4_idmap_domain parameter is used to determine the domain for NFS version 4 id mapping.
#
# @author
# * Daniel Klockenkaemper <mailto:[email protected]>
# * Martin Alfke <[email protected]>
# * Daniel Klockenkaemper <[email protected]>
# * Martin Alfke <[email protected]>
#
class nfs::client (
String $ensure = $nfs::ensure,
Expand Down
9 changes: 3 additions & 6 deletions manifests/client/config.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Class: nfs::client::config
# @summary
# This Function exists to
# 1. configure nfs as a client
# @summary Configure NFS as a client.
#
# @author
# * Daniel Klockenkaemper <mailto:[email protected]>
# * Martin Alfke <[email protected]>
# * Daniel Klockenkaemper <[email protected]>
# * Martin Alfke <[email protected]>
#
class nfs::client::config {
if $nfs::client::nfs_v4 {
Expand Down
66 changes: 29 additions & 37 deletions manifests/client/mount.pp
Original file line number Diff line number Diff line change
@@ -1,77 +1,69 @@
# Function: nfs::client::mount
#
# @summary
# This Function exists to
# 1. manage all mounts on a nfs client
#
# Parameters
# @summary Manage all mounts on a NFS client.
#
# @param server
# String. Sets the ip address of the server with the nfs export
# Sets the ip address of the server with the NFS export.
#
# @param share
# String. Sets the name of the nfs share on the server
# Sets the name of the NFS share on the server.
#
# @param ensure
# String. Sets the ensure parameter of the mount.
# Sets the ensure parameter of the mount.
#
# @param remounts
# String. Sets the remounts parameter of the mount.
# Sets the remounts parameter of the mount.
#
# @param atboot
# String. Sets the atboot parameter of the mount.
# Sets the atboot parameter of the mount.
#
# @param options_nfsv4
# String. Sets the mount options for a nfs version 4 mount.
# Sets the mount options for a NFS version 4 mount.
#
# @param options_nfs
# String. Sets the mount options for a nfs mount.
# Sets the mount options for a NFS mount.
#
# @param bindmount
# String. When not undef it will create a bindmount on the node
# for the nfs mount.
# When not undef it will create a bindmount on the node for the NFS mount.
#
# @param nfstag
# String. Sets the nfstag parameter of the mount.
# Sets the nfstag parameter of the mount.
#
# param nfs_v4
# Boolean. When set to true, it uses nfs version 4 to mount a share.
# When set to true, it uses NFS version 4 to mount a share.
#
# @param owner
# String. Set owner of mount dir
# Set owner of mount directory.
#
# @param group
# String. Set group of mount dir
# Set group of mount directory.
#
# @param mode
# String. Set mode of mount dir
# Set mode of mount directory.
#
# @param mount_root
# String. Overwrite mount root if differs from server config
# Overwrite mount root if differs from server configuration.
#
# @param mount
# @param manage_packages
# @param client_packages
# @param nfs_v4
#
# @example
#
# class { '::nfs':
# client_enabled => true,
# nfs_v4_client => true
# }
#
# nfs::client::mount { '/target/directory':
# server => '1.2.3.4',
# share => 'share_name_on_nfs_server',
# remounts => true,
# atboot => true,
# options_nfsv4 => 'tcp,nolock,rsize=32768,wsize=32768,intr,noatime,actimeo=3'
# }
# class { '::nfs':
# client_enabled => true,
# nfs_v4_client => true
# }
#
# nfs::client::mount { '/target/directory':
# server => '1.2.3.4',
# share => 'share_name_on_nfs_server',
# remounts => true,
# atboot => true,
# options_nfsv4 => 'tcp,nolock,rsize=32768,wsize=32768,intr,noatime,actimeo=3'
# }
#
# @author
# * Daniel Klockenkaemper <mailto:[email protected]>
# * Martin Alfke <[email protected]>
# * Daniel Klockenkaemper <[email protected]>
# * Martin Alfke <[email protected]>
#
define nfs::client::mount (
String[1] $server,
Expand Down
10 changes: 3 additions & 7 deletions manifests/client/package.pp
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# Class: nfs::client::package
#
# @summary
# This Function exists to
# 1. install needed packages for nfs clients
# @summary Install needed packages for NFS clients.
#
# @author
# * Daniel Klockenkaemper <mailto:[email protected]>
# * Martin Alfke <[email protected]>
# * Daniel Klockenkaemper <[email protected]>
# * Martin Alfke <[email protected]>
#
class nfs::client::package {
if $nfs::manage_packages {
Expand Down
10 changes: 3 additions & 7 deletions manifests/client/service.pp
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# Class: nfs::client::service
#
# @summary
# This Function exists to
# 1. manage the needed services for nfs clients
# @summary Manage the needed services for NFS clients.
#
# @author
# * Daniel Klockenkaemper <mailto:[email protected]>
# * Martin Alfke <[email protected]>
# * Daniel Klockenkaemper <[email protected]>
# * Martin Alfke <[email protected]>
#
class nfs::client::service {
if $nfs::client::nfs_v4 {
Expand Down
14 changes: 5 additions & 9 deletions manifests/functions/bindmount.pp
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
# Function: nfs::functions::bindmount
#
# @summary
# This Function exists to
# 1. manage bindmounts
# @summary Manage bindmounts.
#
# @param mount_name
# String. Sets the target directory for the bindmount
# Sets the target directory for the bindmount.
#
# @param ensure
# String. Sets if enabled or not.
# Sets if enabled or not.
#
# @author
# * Daniel Klockenkaemper <mailto:[email protected]>
# * Martin Alfke <[email protected]>
# * Daniel Klockenkaemper <[email protected]>
# * Martin Alfke <[email protected]>
#
define nfs::functions::bindmount (
Optional[String[1]] $mount_name = undef,
Expand Down
20 changes: 8 additions & 12 deletions manifests/functions/create_export.pp
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
# Function: nfs::functions::create_export
#
# @summary
# This Function exists to
# 1. manage export creation
# @summary Manage export creation.
#
# @param clients
# String or Array. Sets the clients allowed to mount the export with options.
# Sets the clients allowed to mount the export with options.
#
# @param ensure
# String. Sets if enabled or not.
# Sets if enabled or not.
#
# @param owner
# String. Sets the owner of the exported directory.
# Sets the owner of the exported directory.
#
# @param group
# String. Sets the group of the exported directory.
# Sets the group of the exported directory.
#
# @param mode
# String. Sets the permissions of the exported directory.
# Sets the permissions of the exported directory.
#
# @author
# * Daniel Klockenkaemper <mailto:[email protected]>
# * Martin Alfke <[email protected]>
# * Daniel Klockenkaemper <[email protected]>
# * Martin Alfke <[email protected]>
#
define nfs::functions::create_export (
Variant[String[1], Array[String[1]]] $clients,
Expand Down
10 changes: 3 additions & 7 deletions manifests/functions/mkdir.pp
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Function: nfs::functions::mkdir
#
# @summary
# This Function exists to
# 1. manage dir creation
# @summary Manage directory creation.
#
# @param ensure
#
# @author
# * Daniel Klockenkaemper <mailto:[email protected]>
# * Martin Alfke <[email protected]>
# * Daniel Klockenkaemper <[email protected]>
# * Martin Alfke <[email protected]>
#
define nfs::functions::mkdir (
String[1] $ensure = 'present',
Expand Down
16 changes: 6 additions & 10 deletions manifests/functions/nfsv4_bindmount.pp
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# Function: nfs::functions::nfsv4_bindmount
#
# @summary
# This Function exists to
# 1. manage bindmounts for nfs4
# @summary Manage bindmounts for NFS v4.
#
# @param v4_export_name
# String. Sets the target directory for the bindmount
# Sets the target directory for the bindmount.
#
# @param bind
# String. Sets the bindmount options.
# Sets the bindmount options.
#
# @param ensure
# String. Sets if mounted or not.
# Sets if mounted or not.
#
# @author
# * Daniel Klockenkaemper <mailto:[email protected]>
# * Martin Alfke <[email protected]>
# * Daniel Klockenkaemper <[email protected]>
# * Martin Alfke <[email protected]>
#
define nfs::functions::nfsv4_bindmount (
String[1] $v4_export_name,
Expand Down
Loading

0 comments on commit a77b94a

Please sign in to comment.