Puppet Class: foreman::plugin::tasks

Defined in:
manifests/plugin/tasks.pp

Summary

Install the foreman-tasks plugin

Overview

Parameters:

  • automatic_cleanup (Boolean) (defaults to: false)

    Enable automatic task cleanup using a cron job

  • cron_line (String) (defaults to: '45 19 * * *')

    Cron line defining when the cleanup cron job should run

  • backup (Boolean) (defaults to: false)

    Enable creating a backup of cleaned up tasks in CSV format when automatic_cleanup is enabled



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'manifests/plugin/tasks.pp', line 12

class foreman::plugin::tasks (
  Boolean $automatic_cleanup = false,
  String $cron_line = '45 19 * * *',
  Boolean $backup = false,
) {
  foreman::plugin { 'tasks':
    package => $foreman::params::plugin_prefix.regsubst(/foreman[_-]/, 'foreman-tasks'),
  }
  $cron_state = $automatic_cleanup ? {
    true    => 'file',
    default => 'absent',
  }
  file { '/etc/cron.d/foreman-tasks':
    ensure  => $cron_state,
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    content => template('foreman/tasks.cron.erb'),
  }
}