Puppet Class: pdsh

Defined in:
manifests/init.pp

Summary

Manage pdsh

Overview

Examples:

include ::pdsh

Parameters:

  • with_rsh (Boolean) (defaults to: false)

    Install rsh support

  • with_ssh (Boolean) (defaults to: true)

    Install ssh support

  • with_genders (Boolean) (defaults to: false)

    Install genders support

  • with_slurm (Boolean) (defaults to: false)

    Install SLURM support

  • support_dsh (Boolean) (defaults to: true)

    Boolean to set if dsh support is available

  • manage_epel (Boolean) (defaults to: true)

    Boolean that determines if EPEL repo should be managed

  • manage_genders (Boolean) (defaults to: true)

    Boolean that determines if genders class should be managed

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

    Packages ensure property

  • package_name (String) (defaults to: 'pdsh')

    Main pdsh package name

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

    rsh support package name

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

    ssh support package name

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

    dshgroup support package name

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

    Genders support package name

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

    SLURM support package name

  • extra_packages (Array) (defaults to: [])

    Additional pdsh packages to install

  • dsh_config_dir (Stdlib::Absolutepath) (defaults to: '/etc/dsh')

    Path to dsh config directory

  • dsh_group_dir (Stdlib::Absolutepath) (defaults to: '/etc/dsh/group')

    Path to dsh group directory

  • dsh_group_dir_purge (Boolean) (defaults to: true)

    Sets if dsh group directory should be purged

  • groups (Variant[Array, Hash]) (defaults to: {})

    Groups that should be defined using pdsh::group

  • use_setuid (Boolean) (defaults to: false)

    Should pdsh binaries have setuid

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

    Sets default remote command via PDSH_RCMD_TYPE environment variable

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

    Additional SSH arguments set via PDSH_SSH_ARGS_APPEND environment variable



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'manifests/init.pp', line 50

class pdsh (
  Boolean $with_rsh               = false,
  Boolean $with_ssh               = true,
  Boolean $with_genders           = false,
  Boolean $with_slurm             = false,
  Boolean $support_dsh            = true,
  Boolean $manage_epel            = true,
  Boolean $manage_genders         = true,
  String $package_ensure          = 'present',
  String $package_name            = 'pdsh',
  Optional[String] $rsh_package_name      = undef,
  Optional[String] $ssh_package_name      = undef,
  Optional[String] $dshgroup_package_name = undef,
  Optional[String] $genders_package_name  = undef,
  Optional[String] $slurm_package_name    = undef,
  Array $extra_packages           = [],
  Stdlib::Absolutepath $dsh_config_dir = '/etc/dsh',
  Stdlib::Absolutepath $dsh_group_dir  = '/etc/dsh/group',
  Boolean $dsh_group_dir_purge    = true,
  Variant[Array, Hash] $groups    = {},
  Boolean $use_setuid             = false,
  Optional[String] $rcmd_type     = undef,
  Optional[String] $ssh_args_append = undef,
) {

  if $with_rsh {
    $_rsh_package_ensure   = $package_ensure
  } else {
    $_rsh_package_ensure   = 'absent'
  }

  if $with_ssh {
    $_ssh_package_ensure   = $package_ensure
  } else {
    $_ssh_package_ensure   = 'absent'
  }

  if $with_genders {
    $_genders_package_ensure = $package_ensure
  } else {
    $_genders_package_ensure = 'absent'
  }

  if $with_slurm {
    $_slurm_package_ensure = $package_ensure
  } else {
    $_slurm_package_ensure = 'absent'
  }

  if $with_genders and $manage_genders {
    include genders
    Class['genders'] -> Class['pdsh::install']
  }

  if $manage_epel {
    include epel
    Yumrepo['epel'] -> Class['pdsh::install']
  }

  contain pdsh::install
  contain pdsh::config

  Class['pdsh::install']
  ->Class['pdsh::config']

  case $groups {
    Array: {
      $groups.each |$group| {
        pdsh::group { $group: }
      }
    }
    default: {
      $groups.each |$name, $group| {
        pdsh::group { $name:
          * => $group,
        }
      }
    }
  }

}