Puppet Class: incron

Defined in:
manifests/init.pp

Overview

Main entry point for incron class which must be included in order to start managing all incron-related resources.

Examples:

Installing incron

include incron

Uninstalling incron and all related resources

class { 'incron':
  ensure => absent,
}

Parameters:

  • ensure (Enum[present, absent]) (defaults to: present)

    Whether to enable or disable incron on the system.

  • package_version (String[1]) (defaults to: installed)

    Provide custom incron package version here.

  • allowed_users (Array[String[1]]) (defaults to: [ ])

    List of users allowed to use incrontab(1). root will be added automatically.

  • denied_users (Array[String[1]]) (defaults to: [ ])

    List of users specifically denied to use incrontab(1). Note: When this is not empty, all users except ones specified here will be able to use incrontab.

  • service_manage (Boolean) (defaults to: true)

    Whether to manage incron service at all.

  • service_ensure (Enum[running, stopped]) (defaults to: running)

    Incron service's 'ensure' parameter.

  • service_enable (Boolean) (defaults to: true)

    Incron service's 'enable' parameter.

  • purge_noop (Boolean) (defaults to: false)

    Run purging in noop mode.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'manifests/init.pp', line 21

class incron (
  Enum[present, absent]  $ensure          = present,

  # incron::install
  String[1]              $package_version = installed,

  # incron::config
  Array[String[1]]       $allowed_users   = [ ],
  Array[String[1]]       $denied_users    = [ ],

  # incron::service
  Boolean                $service_manage  = true,
  Enum[running, stopped] $service_ensure  = running,
  Boolean                $service_enable  = true,

  # incron::purge
  Boolean                $purge_noop      = false,
) {

  if $ensure == present {

    contain incron::install
    contain incron::config
    contain incron::service
    contain incron::purge

    Class['::incron::install'] -> Class['::incron::config'] -> Class['::incron::purge']
    Class['::incron::install'] ~> Class['::incron::service']
    Class['::incron::config'] ~> Class['::incron::service']

  } else {

    contain incron::remove

  }

}