Puppet Class: autofs
- Defined in:
- manifests/init.pp
Summary
Manages the autofs facility, optionally including configuring mount points and maps.Overview
Autofs mount points and their corresponding maps can also be managed via separate autofs::mount, autofs::mapfile, and autofs::mapping resources.
To use this module, simply declare it in your manifest. The module now supports the ability to not only enable autofs, but to also disable or uninstall it completely.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'manifests/init.pp', line 76
class autofs (
String $package_ensure = 'installed',
Hash[String, Hash] $mounts = {},
Variant[String, Array[String]] $package_name = 'autofs',
Boolean $service_enable = true,
String $service_name = 'autofs',
String $auto_master_map = '/etc/auto.master',
String $map_file_owner = 'root',
String $map_file_group = 'root',
Boolean $manage_service_config = false,
Boolean $manage_ldap_auth_conf = false,
Enum['no', 'yes'] $service_use_misc_device = 'yes',
Boolean $purge_map_dir = false,
Enum['stopped', 'running'] $service_ensure = 'running',
Stdlib::Absolutepath $ldap_auth_conf_path = '/etc/autofs_ldap_auth.conf',
Hash $ldap_auth_config = { 'usetls' => 'no', 'tlsrequired' => 'no', 'authrequired' => 'no' },
Stdlib::Absolutepath $service_conf_path = '/etc/sysconfig/autofs',
Optional[Hash[String, Hash]] $mapfiles = undef,
Optional[Hash[String, Hash]] $maps = undef, # deprecated
Optional[String] $package_source = undef,
Optional[String] $reload_command = undef,
Optional[Array[String]] $service_options = undef,
Optional[Hash] $service_conf_options = undef,
Optional[Enum['stopped', 'running']] $automountd_service_ensure = undef,
Optional[Enum['stopped', 'running']] $autounmountd_service_ensure = undef,
Optional[String] $automountd_service_name = undef,
Optional[String] $autounmountd_service_name = undef,
) {
contain 'autofs::package'
unless $package_ensure == 'absent' {
contain 'autofs::service'
}
$mounts.each |String $mount, Hash $attributes| {
autofs::mount { $mount: * => $attributes }
}
if $mapfiles =~ NotUndef {
$mapfiles.each |String $file, Hash $attributes| {
autofs::mapfile { $file: * => $attributes }
}
}
if $maps =~ NotUndef {
deprecation('autofs::maps', 'Class parameter $autofs::maps is deprecated and will be removed in a future version. Define maps via the $mapfiles parameter instead')
$maps.each |String $map, Hash $attributes| {
autofs::map { $map: * => $attributes }
}
}
}
|