Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 3.2.0 < 7.0.0
- AIX, Debian, RedHat, CentOS, OracleLinux, Scientific, Solaris, SLES, SLED, Ubuntu
Start using this module
Add this module to your Puppetfile:
mod 'ghoneycutt-types', '1.13.0'
Learn more about managing modules with a PuppetfileDocumentation
ghoneycutt/types
===
Puppet module to manage default types through hashes in Hiera with the create_resources() function. This module adds validation and helper functions, such as ensuring directories. Without specifying any hashes, this module will take no action.
To use, simply include ::types
and start specifying hashes of types in Hiera
as shown below.
You can add any of the supported options for the types in this module. Please see the Puppet Labs Type Reference for more information.
===
Compatibility
This module supports Puppet v3 >= 3.2.0 (with and without the future parser) and Puppet v4 with Ruby versions 1.8.7, 1.9.3, 2.0.0, 2.1.0 and 2.3.1. Please see .travis.yml for the full matrix.
===
Dependencies
This module depends on puppetlabs/stdlib and ghoneycutt/common.
===
Parameters
crons
Hash of resource type cron
.
- Default: undef
crons_hiera_merge
Boolean to control merges of all found instances of types::crons in Hiera. This is useful for specifying cron resources at different levels of the hierarchy and having them all included in the catalog.
This will default to 'true' in future versions.
- Default: false
execs
Hash of resource type exec
.
- Default: undef
execs_hiera_merge
Boolean to control merges of all found instances of types::execs in Hiera. This is useful for specifying exec resources at different levels of the hierarchy and having them all included in the catalog.
This will default to 'true' in future versions.
- Default: false
file_lines
Hash of resource type file_line
.
- Default: undef
file_lines_hiera_merge
Boolean to control merges of all found instances of types::file_lines in Hiera. This is useful for specifying file_line resources at different levels of the hierarchy and having them all included in the catalog.
This will default to 'true' in future versions.
- Default: true
files
Hash of resource type file
.
- Default: undef
files_hiera_merge
Boolean to control merges of all found instances of types::files in Hiera. This is useful for specifying file resources at different levels of the hierarchy and having them all included in the catalog.
This will default to 'true' in future versions.
- Default: false
mounts
Hash of resource type mount
.
- Default: undef
mounts_hiera_merge
Boolean to control merges of all found instances of types::mounts in Hiera. This is useful for specifying mount resources at different levels of the hierarchy and having them all included in the catalog.
This will default to 'true' in future versions.
- Default: false
packages
Hash of resource type package
.
- Default: undef
packages_hiera_merge
Boolean to control merges of all found instances of types::packages in Hiera. This is useful for specifying package resources at different levels of the hierarchy and having them all included in the catalog.
- Default: true
selbooleans
Hash of resource type selboolean
.
- Default: undef
selbooleans_hiera_merge
Boolean to control merges of all found instances of types::selboolean in Hiera. This is useful for specifying selboolean resources at different levels of the hierarchy and having them all included in the catalog.
- Default: true
services
Hash of resource type service
.
- Default: undef
services_hiera_merge
Boolean to control merges of all found instances of types::services in Hiera. This is useful for specifying file resources at different levels of the hierarchy and having them all included in the catalog.
- Default: true
===
Defines
types::cron
No helper resources are implemented. Simply passes attributes to a cron resource.
Parameters required or with defaults
command
The command to execute in the cron job.
- Required
ensure
State of cron resource. Valid values are 'present' and 'absent'.
- Default: 'present'
types::exec
No helper resources are implemented. Simply passes attributes to a exec resource.
Parameters required
command
The command to execute.
- Required
creates
A file to look for before running the command. The command will only run if the file doesn’t exist. Needs to be an absolute path.
- Default: undef
cwd
The directory from which to run the command. Needs to be an absolute path.
- Default: undef
provider
Backend to use for the exec resource. Usually not needed to set. Possible values are 'posix', 'shell', and 'windows'.
- Default: undef
Optional parameters. See type exec reference for more information.
environment
, group
, logoutput
, onlyif
, path
, refresh
, refreshonly
, returns
, timeout
,tries
, try_sleep
, unless
, and user
types::file_line
No helper resources are implemented. Simply passes attributes to a file_line resource.
Parameters required or with defaults
path
Whether the file should exist, and if so what kind of file it should be. Possible values are 'present', 'absent', 'file', 'directory', and 'link'.
- Required
line
The user to whom the file should belong.
- Required
match
A regex expressed as a string to replace existing lines.
- Default: undef
types::file
No helper resources are implemented. Simply passes attributes to a file resource. The path attribute is not used, so the title must be the fully qualified path.
Parameters required or with defaults
ensure
Whether the file should exist, and if so what kind of file it should be. Possible values are 'present', 'absent', 'file', 'directory', and 'link'.
- Default: 'present'
owner
The user to whom the file should belong.
- Default: 'root'
group
Which group should own the file.
- Default: 'root'
mode
Four digit mode.
- Default: '0644'
types::mount
Besides ensuring the mount resource, will also ensure that the directory for the mount exists.
If options
parameter is passed and it is set to 'defaults' on osfamily
Solaris, it will use '-' as the mount option instead of 'defaults', as
'defaults' is not supported on Solaris.
Parameters required or with defaults
device
- Required
fstype
Mount type.
- Required
ensure
State of mount.
- Default: mounted
atboot
Boolean to mount at boot.
- Default: true
Optional parameters. See type reference for more information.
blockdevice
, dump
, options
, pass
, provider
, remounts
, target
types::package
Parameters required or with defaults
ensure
What state the package should be in.
- Default: present
Optional parameters. See type reference for more information.
adminfile
, allow_virtual
, allowcdrom
, configfiles
, install_options
, package_settings
, provider
, responsefile
, source
, uninstall_options
types::service
No helper resources are implemented. Simply passes attributes to a service resource.
mostly used parameters
ensure
Whether a service should be running.
Valid values are 'stopped', 'false', 'running' and 'true'.
- Default: 'running'
enable
Whether a service should be enabled to start at boot. Valid values are 'true', 'false', 'manual'.
- Default: 'true'
Optional parameters. See type reference for more information.
binary
, control
, hasrestart
, hasstatus
, manifest
, path
, pattern
, provider
, restart
, start
, status
, stop
===
Hiera
cron
exec
file_line
file
mount
package
selboolean
service
v1.12.0 (2017-07-24)
- Add ability to manage the exec resource.
v1.11.1 (2016-11-17)
- Fix bug in metadata
v1.11.0 (2016-11-17)
- Add support for Ruby 2.3.1
v1.10.0 (2016-05-20)
- Add support for selboolean's
v1.9.1 (2016-05-20)
- Upgrade dependency for ghoneycutt/common to 1.6.0
- Support Puppet v4 w/ strict variable checking
- Use puppet-lint from git since it has newer commits than the gem
- Use community puppet-lint plugins
v1.9.0 (2015-09-08)
- Add ensure to file_line
v1.8.0 (2015-06-29)
- Support Puppet v4 and v3 with future parser
v1.7.1 (2015-06-28)
- Fix bug with mounts regarding directory creation
v1.7.0 (2015-03-30)
- Add support for file_line
v1.6.2 (2015-03-30)
- Loosen type checking on packages for specifying version
v1.6.1 (2015-03-30)
- deprecate use of type()
v1.6.0 (2015-03-30)
- Add support to manage packages
v1.5.1 (2014-10-27)
- Support more platforms
v1.5.0 (2014-08-01)
- Add support for services
v1.4.1 (2014-04-22)
- Add metadata for the forge
v1.4.0 (2014-04-22)
- Ability to merge entries from hiera
v1.3.0 (2014-02-05)
- Add ability to manage files
v1.2.0 (2014-02-03)
- Add ability to specify cron jobs
v1.1.0 (2013-12-20)
- Translates mount option for Solaris
v1.0.0 (2013-11-25)
- support resource type: mount
Dependencies
- puppetlabs/stdlib (>= 4.6.0 < 6.0.0)
- ghoneycutt/common (>= 1.7.0 < 2.0.0)
- puppetlabs/cron_core (>= 1.0.0 <2.0.0)
- puppetlabs/mount_core (>= 1.0.2 <2.0.0)
- puppetlabs/selinux_core (>= 1.0.1 <2.0.0)
Copyright (C) 2013-2016 Garrett Honeycutt <code@garretthoneycutt.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.