Defined Type: oddjob::helper

Defined in:
manifests/helper.pp

Overview

Helper to configure Oddjob jobs.

Examples:

include dbus
include oddjob
oddjob::helper { 'mkhomedir':
  content      => file('oddjob/oddjobd-mkhomedir.conf'),
  dbus_content => file('oddjob/oddjob-mkhomedir.conf'),
}

Parameters:

  • content (String)

    The Oddjob job content.

  • dbus_content (Optional[String]) (defaults to: undef)

    The D-Bus configuration content.

  • job (String) (defaults to: $title)

    The name of the Oddjob job.

See Also:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'manifests/helper.pp', line 16

define oddjob::helper (
  String           $content,
  Optional[String] $dbus_content = undef,
  String           $job          = $title,
) {

  include oddjob

  if $dbus_content {
    dbus::system { "oddjob-${job}":
      content => $dbus_content,
    }
  }

  file { "${oddjob::conf_dir}/oddjobd-${job}.conf":
    ensure  => file,
    owner   => 0,
    group   => 0,
    mode    => '0644',
    content => $content,
    notify  => Class['oddjob::service'],
  }
}