autofs
: Manages the autofs facility, optionally including configuring mount points and maps.
autofs::package
: The autofs::package class installs the autofs package.autofs::service
: The autofs::service class configures the autofs service.
autofs::map
: Defined type to generate autofs map entry configuration files.autofs::mapfile
: Defined type to manage overall autofs map filesautofs::mapping
: Defined type to manage a single filesystem mapping in a single map file.autofs::mount
: Defined type to manage mount point definitions in the Autofs master map.
Autofs::Fs_mapping
: A type representing a single filesystem mapping, relative to the context provided by an (unspecified) autofs map. "Single" refers to a singlAutofs::Mapentry
: This type matches a map specfication with map type and optional format, or the built-in -hosts map.Autofs::Options
: A type representing an autofs options list, represented either as a single non-empty string or an array of such strings
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.
- See also
include autofs
class { 'autofs':
package_ensure => 'absent',
}
class { 'autofs':
service_ensure => 'stopped',
service_enable => false,
}
---
autofs::mounts:
home:
mount: '/home'
mapfile: '/etc/auto.home'
options: '--timeout=120'
order: 01
autofs::mapfiles:
'/etc/auto.home':
'mappings':
- key: '*'
options: 'user,rw,soft,intr,rsize=32768,wsize=32768,tcp,nfsvers=3,noacl'
fs: 'server.example.com:/path/to/home/shares'
The following parameters are available in the autofs
class:
mounts
purge_map_dir
ldap_auth_conf_path
ldap_auth_config
service_conf_path
service_options
service_conf_options
mapfiles
maps
package_ensure
package_name
package_source
service_ensure
service_enable
service_name
auto_master_map
map_file_owner
map_file_group
manage_service_config
manage_ldap_auth_conf
service_use_misc_device
reload_command
automountd_service_ensure
autounmountd_service_ensure
automountd_service_name
autounmountd_service_name
Data type: Hash[String, Hash]
the options with which to manage the autofs master map
Default value: {}
Data type: Boolean
Purge the $map_dir directory of unmanaged
Default value: false
Data type: Stdlib::Absolutepath
The path to the ldap_auth.conf file
Default value: '/etc/autofs_ldap_auth.conf'
Data type: Hash
The hash to use for the configuration settings in the ldap_auth.conf file
Default value: { 'usetls' => 'no', 'tlsrequired' => 'no', 'authrequired' => 'no' }
Data type: Stdlib::Absolutepath
The path to the service configuration file
Default value: '/etc/sysconfig/autofs'
Data type: Optional[Array[String]]
An array of options to add to the OPTIONS variable in the service configuration file
Default value: undef
Data type: Optional[Hash]
A hash of environment variables to add to the service configuration file for LDAP configuration
Default value: undef
Data type: Optional[Hash[String, Hash]]
replace: whether to modify the map file if it already exists
Default value: undef
Data type: Optional[Hash[String, Hash]]
Deprecated. Use the mapfiles parameter instead.
Default value: undef
Data type: String
Determines the state of the package. Can be set to: installed, absent, lastest, or a specific version string.
Default value: 'installed'
Data type: Variant[String, Array[String]]
Determine the name of the package to install. Should be covered by hieradata.
Default value: 'autofs'
Data type: Optional[String]
Determine the source of the package, required on certain platforms (AIX)
Default value: undef
Data type: Enum['stopped', 'running']
Determines state of the service. Can be set to: running or stopped.
Default value: 'running'
Data type: Boolean
Determines if the service should start with the system boot. true will start the autofs service on boot. false will not start the autofs service on boot.
Default value: true
Data type: String
Determine the name of the service for cross platform compatibility
Default value: 'autofs'
Data type: String
Filename of the auto.master map for cross platform compatiblity
Default value: '/etc/auto.master'
Data type: String
owner of the automount map files for cross platform compatiblity
Default value: 'root'
Data type: String
group of the automount map files for cross platform compatiblity
Default value: 'root'
Data type: Boolean
Determines if the service configuration file (in /etc/default or /etc/sysconfig) should be managed
Default value: false
Data type: Boolean
Determines if the /etc/autofs_ldap_auth.conf file should be managed
Default value: false
Data type: Enum['no', 'yes']
Sets the USE_MISC_DEVICE value in the service configuration file
Default value: 'yes'
Data type: Optional[String]
In lieu of a service reload capability in Puppet, exec this command to reload automount without restarting it.
Default value: undef
Data type: Optional[Enum['stopped', 'running']]
Determines state of the service. Can be set to: running or stopped.
Default value: undef
Data type: Optional[Enum['stopped', 'running']]
Determines state of the service. Can be set to: running or stopped.
Default value: undef
Data type: Optional[String]
Determine the name of the automountd service for cross platform compatibility
Default value: undef
Data type: Optional[String]
Determine the name of the autounmountd service for cross platform compatibility
Default value: undef
Defined type to generate autofs map entry configuration files.
- See also
- https://voxpupuli.org/puppet-autofs
- Home
- https://voxpupuli.org/puppet-autofs/puppet_classes/autofs.html
- puppet_classes::autofs
- https://www.github.com/voxpupuli/puppet-autofs
- Github
- https://forge.puppet.com/puppet/autofs
- Puppet Forge
- https://voxpupuli.org/puppet-autofs
autofs::map { 'data':
mapcontents => 'mydata -user,rw,soft,intr,rsize=32768,wsize=32768 nfs.example.org:/path/to/some/data',
mapfile => '/etc/auto.data',
order => '01',
}
The following parameters are available in the autofs::map
defined type:
Data type: Enum['present', 'absent']
Whether to create the mapfile or not.
Default value: 'present'
Data type: Variant[Array, String]
The mount point options and parameters, Example: '* -user,rw,soft nfs.example.org:/path/to'
Default value: []
Data type: Stdlib::Absolutepath
Name of the "auto." configuration file that will be generated.
Default value: $title
Data type: Enum['autofs/auto.map.erb', 'autofs/auto.map.exec.erb']
Template to use to generate the mapfile.
Default value: 'autofs/auto.map.erb'
Data type: String
UNIX permissions to be added to the file.
Default value: '0644'
Data type: Boolean
Whether or not to replace an existing mapfile of the same filename/path.
Default value: true
Data type: Integer
Order in which entries will appear in the autofs map file.
Default value: 1
Defined type to manage overall autofs map files
- See also
- https://voxpupuli.org/puppet-autofs
- Home
- https://voxpupuli.org/puppet-autofs/puppet_classes/autofs.html
- puppet_classes::autofs
- https://www.github.com/voxpupuli/puppet-autofs
- Github
- https://forge.puppet.com/puppet/autofs
- Puppet Forge
- https://voxpupuli.org/puppet-autofs
The following parameters are available in the autofs::mapfile
defined type:
Data type: Enum['present', 'absent']
Whether the mapfile should be present on the target system
Default value: 'present'
Data type: Stdlib::Absolutepath
An absolute path to the map file
Default value: $title
Data type: Array[Autofs::Fs_mapping]
an array of mappings to enroll in the file. Additional mappings can be specified for this mapfile via autofs::mapping resources
Default value: []
Data type: Boolean
Whether to replace the contents of any an existing file at the specified path
Default value: true
Data type: Boolean
Whether to make the mapfile executable or not
Default value: false
When ensured 'present', a autofs::mapfile resource managing the overall target map file must also be present in the catalog. This resource implements Autofs's 'sun' map format, which is the default.
It is not supported to declare multiple autofs::mappings with the same key, targetting the same map file, and ensured 'present'.
- See also
- https://voxpupuli.org/puppet-autofs
- Home
- https://voxpupuli.org/puppet-autofs/puppet_classes/autofs.html
- puppet_classes::autofs
- https://www.github.com/voxpupuli/puppet-autofs
- Github
- https://forge.puppet.com/puppet/autofs
- Puppet Forge
- https://voxpupuli.org/puppet-autofs
autofs::mapping{ '/etc/auto.data_data':
mapfile => '/etc/auto.data',
key => 'data',
options => 'rw,sync,suid',
fs => 'storage_host.my.com:/path/to/data'
}
autofs::mapping{ '/etc/auto.data_data':
mapfile => '/etc/auto.data',
key => 'data',
options => ['ro', 'noexec', 'nodev'],
fs => 'storage_host.my.com:/path/to/data'
}
autofs::mapping{ '/etc/auto.data_data':
mapfile => '/etc/auto.data',
key => 'data',
fs => 'storage_host.my.com:/path/to/data'
}
The following parameters are available in the autofs::mapping
defined type:
Data type: Enum['present', 'absent']
Whether the mapping should be present in the target mapfile; ensuring 'absent' is not meaningfully different from omitting the resource declaration altogether
Default value: 'present'
Data type: Variant[String[1], Array[String[1]]]
the remote filesystem to mount
Data type: String[1]
the autofs key for this mapping. For indirect maps it is the basename of the mountpoint directory for $fs (not to be confused with an autofs mount point, which is the parent directory). For direct maps it is the absolute path to the mountpoint directory.
Data type: Stdlib::Absolutepath
the absolute path to the file containing the Autofs map to which this mapping belongs
Data type: Optional[Autofs::Options]
a comma-delimited mount options string or an array of individual mount options; neither individual options nor the overall option list should be specified with a leading hyphen (-); that is part of the map file format, not of the options themselves, and it is provided by this resource
Default value: undef
Data type: Integer
an integer describing the relative order of the mapping represented by this resource within the target map file (default 10). The order matters only if the same kay is enrolled more than once in the map, in which case only the first is effective.
Default value: 10
autofs::mount { 'home': mount => '/home', mapfile => '/etc/auto.home', options => '--timeout=120', }
autofs::mount { 'smb': mount => '/smb', mapfile => 'program:/etc/auto.smb', options => '--timeout=120', }
- See also
- https://voxpupuli.org/puppet-autofs
- Home
- https://voxpupuli.org/puppet-autofs/puppet_classes/autofs.html
- puppet_classes::autofs
- https://www.github.com/voxpupuli/puppet-autofs
- Github
- https://forge.puppet.com/puppet/autofs
- Puppet Forge
- https://voxpupuli.org/puppet-autofs
corresponding map file needs to be managed separately.)
separately, if needed).
autofs::mount { '/smb':
ensure => 'absent',
mapfile => 'program:/etc/auto.smb',
}
The following parameters are available in the autofs::mount
defined type:
Data type: Enum['present', 'absent']
Whether a definition of this mount point should be present in the master map. (default: 'present')
Default value: 'present'
Data type: Stdlib::Absolutepath
The absolute path of the Autofs mount point being managed. For a direct map, this should be '/-'. Otherwise, it designates the parent directory of the filesystem mount points managed by the map assigned to this Autofs mount point. (default: the title of this resource)
Default value: $title
Data type: Variant[Stdlib::Absolutepath,Autofs::Mapentry]
a designation for the Autofs map associated with this mount point. Typically, this is an absolute path to a map file, whose base name conventionally begins with "auto.", but Autofs recognizes other alternatives, too, that can be specified via this parameter.
Data type: Stdlib::Absolutepath
Full path, including filename, to the autofs master map. Usually the correct master map will be chosen automatically, and you will not need to specify this.
Default value: $autofs::auto_master_map
Data type: Stdlib::Absolutepath
Full path, including directory name, to the autofs master map's drop-in directory. Relevant only when $use_dir is true. (default: '/etc/auto.master.d').
Default value: '/etc/auto.master.d'
Data type: Boolean
If true, autofs will manage this mount via a file in the master map's drop-in directory instead of directly in the master map. The master map will still be managed, however, to ensure at least that it enables the (correct) drop-in directory.
Default value: false
Data type: Optional[String]
Options to be specified for the autofs mount point within the master map.
Default value: undef
Data type: Integer
The relative order in which entries will appear in the master map. Irrelevant when $use_dir is true.
Default value: 1
A type representing a single filesystem mapping, relative to the context provided by an (unspecified) autofs map. "Single" refers to a single key, but not necessarily a single mounted filesystem. Autofs has the concept of a multi-mount, where the map specifies multiple filesystems to mount via a single key, and the concept of shared mounts, where multiple keys reference subdirectories of a single (auto-)mounted file system. This type simply provides for a generic representation of all those alternatives via the 'fs' member.
{ 'key' => 'data', 'options' => 'rw,sync', 'fs' => 'fs.host.com:/path/to/data' }
{ 'key' => '/path/to/mnt', fs => 'remote.org:/exported/path' }
{ 'key' => 'other', 'options' => [ 'ro', 'noexec' ], 'fs' => 'external.net:/the/exported/fs' }
Alias of
Struct[{
key => String[1],
options => Optional[Autofs::Options],
order => Optional[Integer],
fs => Variant[String[1], Array[String[1]]],
}]
This type matches a map specfication with map type and optional format, or the built-in -hosts map.
Alias of Pattern[/\A([a-z]+(,[a-z]+)?:\S+|-hosts)\z/]
A type representing an autofs options list, represented either as a single non-empty string or an array of such strings
Alias of Variant[Pattern[/\A\S+\z/], Array[Pattern[/\A\S+\z/]]]