Puppet Class: toughen::aide

Defined in:
manifests/aide.pp

Overview

Class: toughen::aide

This class installs and schedules the AIDE software

Parameters


  • ‘package_ensure`

Whether to install the AIDE package or not, defaults to install.

  • ‘check_hour`

The hour on which to schedule the cron task, defaults to 5.

  • ‘check_minute`

The minute on which to schedule the cron task, defaults to 0.

Parameters:

  • package_ensure (Any) (defaults to: 'installed')
  • check_hour (Any) (defaults to: 5)
  • check_minute (Any) (defaults to: 0)


17
18
19
20
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
# File 'manifests/aide.pp', line 17

class toughen::aide (
  $package_ensure = 'installed',
  $check_hour = 5,
  $check_minute = 0
){

  if !($package_ensure in [ 'installed', 'absent' ]) {
    fail('package_ensure parameter must be "installed" or "absent"')
  }

  validate_integer($check_hour)
  validate_integer($check_minute)

  package { 'aide':
    ensure => $package_ensure,
  }

  if $package_ensure == 'installed' {
    cron { 'aide-check':
      command => '/usr/sbin/aide --check',
      user    => root,
      hour    => $check_hour,
      minute  => $check_minute,
      require => Package['aide'],
    }
  }

  # TODO: first run and other config
}