Defined Type: sonofgridengine::collector

Defined in:
modules/sonofgridengine/manifests/collector.pp

Overview

Parameters:

  • dir (Any)
  • sourcedir (Any)
  • rname (Any) (defaults to: $title)
  • config (Any) (defaults to: undef)
  • etcdir (Any) (defaults to: '/var/lib/gridengine/etc')


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'modules/sonofgridengine/manifests/collector.pp', line 3

define sonofgridengine::collector(
    $dir,
    $sourcedir,
    $rname   = $title,
    $config  = undef,
    $etcdir  = '/var/lib/gridengine/etc',
) {

    $conf    = "${etcdir}/${dir}/${rname}"
    $dotfile = "${etcdir}/${dir}/.${rname}"
    $tracker = "${etcdir}/tracker/${dir}/${rname}"

    file { $dotfile:
        ensure  => file,
        owner   => 'sgeadmin',
        group   => 'sgeadmin',
        mode    => '0664',
        content => template($config),
    }

    exec { "collect-${rname}-resource":
        command => "${etcdir}/bin/collector '${rname}' '${sourcedir}' '${dotfile}' '${conf}'",
        require => File[$dotfile],
    }
}