deferred_resourcesdeferred_resources::files: This class takes an Array of file resources to remove, and a Hash of file resources to install. After the entire puppet catalog has been comdeferred_resources::groups: This class takes an Array of group resources to remove, and a Hash of group resources to install. After the entire puppet catalog has been cdeferred_resources::packages: This class takes twoHashesof packages, one to remove and one to install. After the entire puppet catalog has been compiled, it will procdeferred_resources::users: This class takes an Array of user resources to remove, and a Hash of user resources to install. After the entire puppet catalog has been com
deferred_resources: *** DANGER *** THIS RESOURCE TYPE DOES THINGS THAT MAY BE CONFUSING MAKE SURE YOU FULLY UNDERSTAND HOW IT WORKS PRIOR TO USING IT *** DANGE
The deferred_resources class.
The following parameters are available in the deferred_resources class:
Data type: Enum['warning','enforcing']
If set to enforcing then the management classses will take action on the
system. If set to 'warning' a message will be printed noting what would
have taken place on the system but the catalog will not be updated.
Default value: 'warning'
Data type: Simplib::PuppetLogLevel
Set the log level for warning messages
Default value: 'info'
Data type: Boolean
Default value: true
This class takes an Array of file resources to remove, and a Hash of file resources to install.
After the entire puppet catalog has been compiled, it will process both lists and, for any resource that is not already defined in the catalog, it will take the appropriate action.
An exception will be raised if you list the same file in both lists.
The following parameters are available in the deferred_resources::files class:
Data type: Array[Stdlib::Absolutepath]
A list of files to remove.
Default value: []
Data type: Hash[Stdlib::Absolutepath, Hash]
A Hash of files to install.
Default value: {}
Data type: Boolean
DANGEROUS - READ CAREFULLY
Update the following attributes of resources that already exist in the
catalog if set in the install Hash:
- user
- group
- content
- Will unset
source
- Will unset
If you wish to affect additional parameters on an existing resource in the catalog, you should not use this class and should instead use a Resource Collector.
@see https://puppet.com/docs/puppet/5.3/lang_resources_advanced.html#amending-attributes-with-a-collector
Default value: false
Data type: Enum['warning','enforcing']
@see deferred_resources::mode
Default value: $deferred_resources::mode
Data type: Simplib::PuppetLogLevel
@see deferred_resources::log_level
Default value: $deferred_resources::log_level
This class takes an Array of group resources to remove, and a Hash of group resources to install.
After the entire puppet catalog has been compiled, it will process both lists and, for any resource that is not already defined in the catalog, it will take the appropriate action.
An exception will be raised if you list the same group in both lists.
The following parameters are available in the deferred_resources::groups class:
Data type: Array[String[1]]
A list of groups to remove.
Default value: []
Data type: Variant[Hash, Array[String[1]]]
A list of groups to install.
- A
Hashcan be used to add extra attributes for the group, but theensureattribute will always be set toabsentfor removal andpresentfor creation.
Default value: {}
Data type: Enum['warning','enforcing']
@see deferred_resources::mode
Default value: $deferred_resources::mode
Data type: Simplib::PuppetLogLevel
@see deferred_resources::log_level
Default value: $deferred_resources::log_level
This class takes two Hashes of packages, one to remove and one to install.
After the entire puppet catalog has been compiled, it will process both lists and, for any resource that is not already defined in the catalog, it will take the appropriate action.
An exception will be raised if you list the same package in both lists.
The following parameters are available in the deferred_resources::packages class:
Data type: Variant[Hash, Array]
A list of packages to remove.
- A
Hashcan be used to add extra attributes for the package, but theensureattribute will be overwritten if it is included.
Default value: {}
Data type: Enum['absent','purged']
If removing, then this is the state that the packages should have.
- This will be overridden by anything set in options applied to an entry in
the
$removeHash.
Default value: 'absent'
Data type: Variant[Hash, Array]
A list of packages to install.
- A
Hashcan be used to add extra attributes for the package, but theensureattribute will always be set to$package_ensure.
Default value: {}
Data type: Enum['latest','present','installed']
If installing, then this is the state that the packages should have.
- This will be overridden by anything set in options applied to an entry in
the
$installHash.
Default value: simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' })
Data type: Hash
A Hash of options to apply to all packages (both remove and install.
If ensure is entered in these options it will be overwritten.
- These options may be anything that a Puppet
Packageresource can normally accept.
Default value: {}
Data type: Enum['warning','enforcing']
@see deferred_resources::mode
Default value: $deferred_resources::mode
Data type: Simplib::PuppetLogLevel
@see deferred_resources::log_level
Default value: $deferred_resources::log_level
This class takes an Array of user resources to remove, and a Hash of user resources to install.
After the entire puppet catalog has been compiled, it will process both lists and, for any resource that is not already defined in the catalog, it will take the appropriate action.
An exception will be raised if you list the same user in both lists.
The following parameters are available in the deferred_resources::users class:
Data type: Array[String[1]]
A list of users to remove.
Default value: []
Data type: Variant[Hash, Array[String[1]]]
A list of users to install.
- A
Hashcan be used to add extra attributes for the user, but theensureattribute will always be set toabsentfor removal andpresentfor creation.
Default value: {}
Data type: Enum['warning','enforcing']
@see deferred_resources::mode
Default value: $deferred_resources::mode
Data type: Simplib::PuppetLogLevel
@see deferred_resources::log_level
Default value: $deferred_resources::log_level
*** DANGER ***
THIS RESOURCE TYPE DOES THINGS THAT MAY BE CONFUSING MAKE SURE YOU FULLY UNDERSTAND HOW IT WORKS PRIOR TO USING IT
*** DANGER ***
WARNING: This type is NOT meant to be called directly. Please use the helper classes in the module.
This type will process after the catalog has been compiled but before it is applied. It takes a list of resources and checks for the existence of that resource in the compiled catalog. If the resource has already been defined in the catalog, it prints out a message that an action will not be performed.
If mode is set to warning, instead of adding resources to the catalog,
it prints out a list of resources that would have been added.
The following parameters are available in the deferred_resources type.
A Hash of options to be used for all resources.
Default value: Hash.new
Valid values: alert, crit, debug, notice, emerg, err, info, warning
Set the message log level for notifications.
Default value: warning
Valid values: enforcing, warning
enforcing => Actually add the resource to the catalog post-compilation
warning => Tell the user what would be done but do not actually alter
the catalog.
Default value: warning
namevar
Unique name for this resource.
A Hash or Array of items that should be updated on existing attributes if they exist.
This is basically a controlled resource collector and absolutely must not be taken lightly when used since it will affect existing resources in your catalog.
If you want to be explicit, use a Resource Collector and do not set this.
If a Hash is passed, each key is the attribute that can be overridden and an optional hash of options can be passed with the following meanings.
- 'invalidates':
- An Array of entries that this particular parameter invalidates.
This means that the items in the list will be set to
nilin the overridden resource.
- An Array of entries that this particular parameter invalidates.
This means that the items in the list will be set to
Valid values: /.+/
The type of Puppet resource that will be passed in :resources
A Hash or Array of resources to add to the catalog.