incron
: This class manages /etc/incron.allow and /etc/incron.deny and the incrond service.incron::service
: This class wraps the incrond service
incron::system_table
: Add a system table $name to /etc/incron.d If multiplepath
and/orcommand
options are specified, they will be expanded into all matcincron::user
: Add the user$name
to/etc/incron.allow
incron_system_table
: Creates an 'incrond' compatible system table Line order will be preserved Any paths that contain globs '*' will be expanded into the approp
Incron::Mask
: Valid incron masks
This class manages /etc/incron.allow and /etc/incron.deny and the incrond service.
The following parameters are available in the incron
class:
Data type: String
The ensure
parameter of Package
resources in the incron
namespace.
Default value: simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' })
Data type: Array[String[1]]
An Array of additional incron users, using the defined type incron::user.
Default value: []
Data type: Variant[Enum['unlimited'],Integer[0]]
The maximum open files limit that should be set for incrond
- This should generally be left as unlimited since incrond could be watching a great number of events. However, you may need to lower this if you find that it is simply overwhelming your system (and analyze your incrond rules).
Default value: 'unlimited'
Data type: Hash
Create incron::system_table resources with hiera
Default value: {}
Data type: Boolean
Whether or not to purge unknown incron tables
Default value: false
This class wraps the incrond service
Add a system table $name to /etc/incron.d
If multiple path
and/or command
options are specified, they will be
expanded into all matching possibilities.
incron::system_table { 'test':
path => ['/foo/bar', '/foo2/bar2'],
command => ['/bin/baz', '/bin/baz2']
}
Results in /etc/incron.d/test with contents:
/foo/bar IN_MODIFY,IN_MOVE,IN_CREATE,IN_DELETE /bin/baz
/foo/bar IN_MODIFY,IN_MOVE,IN_CREATE,IN_DELETE /bin/baz2
/foo2/bar2 IN_MODIFY,IN_MOVE,IN_CREATE,IN_DELETE /bin/baz
/foo2/bar2 IN_MODIFY,IN_MOVE,IN_CREATE,IN_DELETE /bin/baz2
For the following directory structure:
/foo/bar/one/one_more/baz/one.txt
/foo/bar/one/one_other/baz/ignore.me
/foo/bar/two/baz/two.txt
incron::system_table { 'glob':
path => '/foo/bar/**/baz/*.txt',
command => '/bin/baz'
}
Results in /etc/incron.d/glob with contents:
/foo/bar/one/one_more/baz/one.txt IN_MODIFY,IN_MOVE,IN_CREATE,IN_DELETE /bin/baz
/foo/bar/two/baz/two.txt IN_MODIFY,IN_MOVE,IN_CREATE,IN_DELETE /bin/baz
The following parameters are available in the incron::system_table
defined type:
Data type: Boolean
Whether to enable or disable the table
Default value: true
Data type: Optional[Variant[Array[String], String]]
Filesystem path(s) to monitor
- May contain Ruby
Dir.glob
compatible Strings
Default value: undef
Data type: Array[String]
Symbolic array or numeric mask for events
Default value: ['IN_MODIFY','IN_MOVE','IN_CREATE','IN_DELETE']
Data type: Optional[Variant[Array[String], String]]
Command(s) to run on detection of event in $path
Default value: undef
Data type: Optional[String]
Custom content to add to /etc/incron.d/$name. Defining this disables validation on the content and take priority.
Default value: undef
Add the user $name
to /etc/incron.allow
Creates an 'incrond' compatible system table
Line order will be preserved
Any paths that contain globs '*' will be expanded into the appropriate number of rules based on glob expansion on the target system
Globbed paths that do not result in a valid path expansion will be ignored
Globs starting with /** will also be ignored due to the burden placed on the system
WARNING: TAKE CARE THAT YOU KNOW WHAT YOUR GLOBS WILL EXPAND TO!
The following properties are available in the incron_system_table
type.
Valid values: present
, absent
The state that should be enforced for the table
Default value: present
The following parameters are available in the incron_system_table
type.
The command(s) to apply when the paths change
If multiple paths and commands are specified, they will create multiple lines that contain all possible combinations
Raw content to add to the file - Will be validated
The incron "masks" to apply
namevar
The filename to use for the table - Non-word characters will be replaced
Path(s) to watch and apply the command
The specific backend to use for this incron_system_table
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
Valid incron masks
Alias of Enum['IN_ACCESS', 'IN_ALL_EVENTS', 'IN_ATTRIB', 'IN_CLOSE', 'IN_CLOSE_NOWRITE', 'IN_CLOSE_WRITE', 'IN_CREATE', 'IN_DELETE', 'IN_DELETE_SELF', 'IN_DONT_FOLLOW', 'IN_MODIFY', 'IN_MOVE', 'IN_MOVED_FROM', 'IN_MOVED_TO', 'IN_MOVE_SELF', 'IN_NO_LOOP', 'IN_ONESHOT', 'IN_ONLYDIR', 'IN_OPEN', 'loopable=true', 'recursive=false', 'dotdirs=true']