Defined Type: slurm::conf

Defined in:
manifests/conf.pp

Summary

Manage Slurm main configuration

Overview

Examples:

Create /etc/slurm/slurm-ascend.conf


include slurm
$cluster_conf = {
  'ClusterName'   => 'ascend',
  'SlurmctldHost' => 'ascend-slurm01.example.com',
}
slurm::conf { 'ascend':
  configs => $slurm::slurm_conf + $cluster_conf,
}

Parameters:

  • configs (Hash) (defaults to: {})

    Hash of Slurm configs

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

    Template to use to generate slurm.conf contents

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

    Source of configuration instead of templated configs

  • config_name (String) (defaults to: "slurm-${name}.conf")

    Name of configuration file



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
# File 'manifests/conf.pp', line 23

define slurm::conf (
  Hash $configs = {},
  Optional[String] $template = undef,
  Optional[String] $source = undef,
  String $config_name = "slurm-${name}.conf",
) {

  include slurm

  if $template {
    $_template = $template
  } else {
    $_template = $slurm::slurm_conf_template
  }
  if $source {
    $content = undef
  } else {
    $content = template($_template)
  }

  concat { $config_name:
    ensure => 'present',
    path   => "${slurm::conf_dir}/${config_name}",
    owner  => 'root',
    group  => 'root',
    mode   => '0644',
    notify => $slurm::service_notify,
  }

  concat::fragment { "${config_name}-config":
    target  => $config_name,
    content => $content,
    source  => $source,
    order   => '00',
  }

}