Puppet Class: sudo::package::solaris

Defined in:
manifests/package/solaris.pp

Summary

install sudo under solaris 10/11.

Overview

Examples:

class { sudo::package::solaris:
  package => 'sudo',
}

Parameters:

  • package (Optional[String[1]]) (defaults to: undef)

    The name of the sudo package to be installed

  • package_ensure (String[1]) (defaults to: 'present')

    Ensure if present or absent

  • package_source (Optional[String[1]]) (defaults to: undef)

    Where to find the sudo packge, should be a local file or a uri

  • package_admin_file (Optional[String[1]]) (defaults to: undef)

    Solaris 10 package admin file for unattended installation

  • package_provider (Optional[String[1]]) (defaults to: undef)

Author:

  • Toni Schmidbauer <toni@stderr.at>



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
# File 'manifests/package/solaris.pp', line 25

class sudo::package::solaris (
  Optional[String[1]] $package            = undef,
  Optional[String[1]] $package_source     = undef,
  String[1]           $package_ensure     = 'present',
  Optional[String[1]] $package_admin_file = undef,
  Optional[String[1]] $package_provider   = undef,
) {
  $package_defaults = {
    ensure   => $package_ensure,
    provider => $package_provider,
  }

  case $facts['kernelrelease'] {
    '5.11': {
      package { $package:
        * => $package_defaults,
      }
    }
    '5.10': {
      package { $package:
        *               => $package_defaults,
        source          => $package_source,
        adminfile       => $package_admin_file,
        install_options => [
          '-G',
        ],
      }
    }
    default: {
      fail("Unsupported Solaris kernelrelease ${facts['kernelrelease']}!")
    }
  }
}