Puppet Class: tang

Defined in:
manifests/init.pp

Overview

Class: tang

Main class that includes all other classes for the tang module.

Parameters:

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

    Whether to install the tang package, and/or what version. Values: 'present', 'latest', or a specific version number.

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

    Specifies the name of the package to install.

  • service_enable (Boolean) (defaults to: true)

    Whether to enable the tang service at boot.

  • service_ensure (Enum['running', 'stopped']) (defaults to: 'running')

    Whether the tang service should be running.

  • service_name (String) (defaults to: 'tangd.socket')

    Specifies the name of the service to manage.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'manifests/init.pp', line 12

class tang (
  String                     $package_ensure = 'present',
  String                     $package_name   = 'tang',
  Boolean                    $service_enable = true,
  Enum['running', 'stopped'] $service_ensure = 'running',
  String                     $service_name   = 'tangd.socket',
  ) {
  case $::operatingsystem {
    'RedHat', 'CentOS': {
      contain tang::install
      contain tang::config
      contain tang::service

      Class['tang::install']
      -> Class['tang::config']
      ~> Class['tang::service']
    }
    default: {
      fail("${::operatingsystem} not supported")
    }
  }
}