Classes
Public Classes
autofs
: Class: autofs Manages the autofs facility, optionally including configuring mount points and maps. Autofs mount points and their correspond
Private Classes
autofs::package
: Class: autofs::package The autofs::package class installs the autofs package. This class will determine if the OS running is a supported Liautofs::service
: Class: autofs::service The autofs::service class configures the autofs service. This class can be used to disable or limit the autofs servic
Defined types
autofs::map
: Define: autofs::map Defined type to generate autofs map entry configuration files.autofs::mapfile
: Define autofs::mapfile Defined type to manage overall autofs map filesautofs::mapping
: Define autofs::mapping Defined type to manage a single filesystem mapping in a single map file. When ensured 'present', a autofs::mapfile reautofs::mount
: Define: autofs::mount Defined type to manage mount point definitions in the Autofs master map. autofs::mount { 'home': mount
Class: autofs
Manages the autofs facility, optionally including configuring mount points and maps.
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 https://voxpupuli.org/puppet-autofs Home https://www.github.com/voxpupuli/puppet-autofs Github https://forge.puppet.com/puppet/autofs Puppet Forge
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.
Data type: Hash[String, Hash]
the options with which to manage the autofs master map
Options:
- :mount
String
: The autofs mount point to be managed - :order
Integer
: The relative order in which the mount point's definition will appear in the master map - :mapfile
String
: Name of the autofs map file for this mount point - :options
String
: Mount options to be recorded for this mount point in the master map - :master
String
: Full path, including file name, to the master map in which to manage this mount point - :map_dir
String
: Full path, including file name, to the master map drop-in directory in which to manage this mount's definition. Relevant only when :use_dir is set to true - :use_dir
Boolean
: Whether to manage this mount via a file in the master map's drop-in directory instead of directly in the master map
Data type: Optional[Hash[String, Hash]]
options with which to manage map files.
Options:
- path:
String
: Full path, including file name, to a map file to manage. Defaults to the key with which this value is associated. - mappings:
Array
: an array of hashes defining specific, sun-format mappings that should appear in this map file. Each has a 'key', an option list in string or array form, and a filesystem specification as expected by the 'mount' command. - replace:
Boolean
: 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.
Data type: Variant[String, Array[String]]
Determine the name of the package to install. Should be covered by hieradata.
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.
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.
Data type: String
Determine the name of the service for cross platform compatibility
Data type: String
Filename of the auto.master map for cross platform compatiblity
Data type: String
owner of the automount map files for cross platform compatiblity
Data type: String
group of the automount map files for cross platform compatiblity
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
Define: autofs::map
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
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
Define autofs::mapfile
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
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
Define autofs::mapping
Defined type to manage a single filesystem mapping in a single map file. 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
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: Pattern[/\S/]
the remote filesystem to mount
Data type: Pattern[/\A\S+\z/]
the autofs key for this mappingr. 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
Define: autofs::mount
Defined type to manage mount point definitions in the Autofs master map.
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
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