Defined Type: slurm::nodeset

Defined in:
manifests/nodeset.pp

Summary

Manage SLURM nodeset configuration

Overview

Parameters:

  • feature (Optional[String]) (defaults to: undef)
  • nodes (Optional[String]) (defaults to: undef)
  • node_set (String) (defaults to: $name)
  • target (Any) (defaults to: 'slurm.conf')
  • order (Any) (defaults to: '40')


12
13
14
15
16
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
# File 'manifests/nodeset.pp', line 12

define slurm::nodeset (
  Optional[String] $feature   = undef,
  Optional[String] $nodes     = undef,
  String $node_set            = $name,
  $target                     = 'slurm.conf',
  $order                      = '40',
) {

  include ::slurm

  if $nodes {
    $_nodes = "Nodes=${nodes}"
  } else {
    $_nodes = undef
  }

  if $feature {
    $_feature = "Feature=${feature}"
  } else {
    $_feature = undef
  }

  $params = ["NodeSet=${node_set}", $_nodes, $_feature].filter |$v| { $v =~ NotUndef }

  $content = join($params, ' ')

  concat::fragment { "${target}-nodeset-${name}":
    target  => $target,
    content => "${content}\n",
    order   => $order,
  }

}