Defined Type: slurm::spank

Defined in:
manifests/spank.pp

Summary

Manage SLURM SPANK plugin

Overview

Parameters:

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

    Ensure state of SPANK plugin

  • plugin (String) (defaults to: "${name}.so")

    The shared library

  • arguments (Optional[Variant[Hash, Array, String]]) (defaults to: undef)

    Arguments for the plugin

  • required (Boolean) (defaults to: false)

    Is this plugin required?

  • manage_package (Boolean) (defaults to: true)

    Manage plugin package?

  • package_name (String) (defaults to: "slurm-spank-${name}")

    Plugin package name

  • package_ensure (String) (defaults to: 'installed')

    Plugin package ensure value

  • order (Any) (defaults to: '50')

    Order in plugstack.conf



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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'manifests/spank.pp', line 20

define slurm::spank (
  Enum['present','absent'] $ensure = 'present',
  String $plugin = "${name}.so",
  Optional[Variant[Hash, Array, String]] $arguments = undef,
  Boolean $required = false,
  Boolean $manage_package = true,
  String $package_name = "slurm-spank-${name}",
  String $package_ensure = 'installed',
  $order = '50',
) {

  include slurm

  if $slurm::repo_baseurl {
    $package_require = Yumrepo['slurm']
  } else {
    $package_require = undef
  }

  if $ensure == 'absent' {
    $_package_ensure = 'absent'
  } else {
    $_package_ensure = $package_ensure
  }

  if $manage_package {
    $fragment_require = Package["SLURM SPANK ${name} package"]
    package { "SLURM SPANK ${name} package":
      ensure  => $_package_ensure,
      name    => $package_name,
      notify  => $slurm::service_notify,
      require => $package_require,
    }
  } else {
    $fragment_require = undef
  }

  if $ensure == 'present' and $slurm::manage_slurm_conf and ! $slurm::configless {
    concat::fragment { "plugstack.conf-${name}":
      target  => 'plugstack.conf',
      content => template('slurm/spank/plugin.conf.erb'),
      order   => $order,
      require => $fragment_require,
    }
  }

}