Puppet Class: znapzend

Defined in:
manifests/init.pp

Summary

Main class for managing the installation and configuration of the znapzend service.

Overview

Class: znapzend

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

Parameters:

  • gcc_packages (Array) (defaults to: [ 'gcc', 'gcc-c++', ])

    Specifies what packages are installed for the build requirements of znapzend for providing gcc/make.

  • manage_epel (Boolean) (defaults to: true)

    Specifies whether or not the module should manage the EPEL repository.

  • manage_gcc (Boolean) (defaults to: true)

    Specifies whether or not the module should manage the installation of gcc.

  • manage_mbuffer (Boolean) (defaults to: true)

    Specifies whether or not the module should manage the installation of mbuffer.

  • manage_perl (Boolean) (defaults to: true)

    Specifies whether on not the module should manage the installation of the perl-core rpm.

  • manage_prereqs (Boolean) (defaults to: true)

    Specifies whether or not the module should manage any of the components of the preqrequites for building znapzend.

  • mbuffer_packages (Array) (defaults to: [ 'mbuffer', ])

    Specifies what package(s) should be installed on the system to provide mbuffer support for znapzend to use.

  • perl_packages (Array) (defaults to: [ 'perl-core', ])

    Specifies what perl RPM(s) should be installed on the system for building and running znapzend.

  • plan_confdir (Stdlib::Unixpath) (defaults to: '/etc/znapzend/configs')

    Specifies where the znapzend backup plan configuration files will be located.

  • plan_confdir_purge (Boolean) (defaults to: true)

    Specifies whether or not the znapzend configuration directories should be purged of files not managed by puppet.

  • plan_confdir_setup (Array[Stdlib::Unixpath]) (defaults to: [ '/etc/znapzend', '/etc/znapzend/configs', ])

    An array of directories that puppet should create on the system for where the znapzend backup plans will be stored.

  • plan_conffile_mode (String) (defaults to: '0644')

    The mode that should be used for the znapzend backup plan configuration files.

  • plan_conffile_template (String) (defaults to: 'znapzend/plan_conffile_template.erb')

    The name of the template to use for the znapzend backup plan configuration files.

  • service_enable (Boolean) (defaults to: true)

    Whether to enable the znapzend service at boot.

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

    Whether the znapzend service should be running.

  • service_name (String) (defaults to: 'znapzend')

    Specifies the name of the service to manage.

  • service_options (String) (defaults to: '')

    Specifies options placed in /etc/default/znapzend for use by the znapzend service.

  • service_options_template (String) (defaults to: 'znapzend/znapzend.default.erb')

    Specifies the name of the template to use for /etc/default/znapzend.

  • service_systemd_afters (Array) (defaults to: [ 'zfs-import-cache.service', 'zfs-import-scan.service', ])

    Specifes what systemd services should be started up prior to the znapzend.service.

  • service_systemd_template (String) (defaults to: 'znapzend/znapzend.service.erb')

    Specifies the name of the template to use for the /etc/systemd/system/znapzend.service file.

  • service_sysv_template (String) (defaults to: 'znapzend/znapzend.sysv.erb')

    Specifies the name of the template to use for the /etc/init.d/znapzend file.

  • znapzend_download_location (Stdlib::Unixpath) (defaults to: '/tmp')

    Specifies where the znapzend archive resource should download the tar.gz file to for later extraction.

  • znapzend_package_version (String) (defaults to: '0.19.1')

    Specifies the version of znapzend to download and install.

  • znapzend_package_extractpath (Stdlib::Unixpath) (defaults to: '/usr/local/src')

    Specifies where the znapzend archive resource should extract the tar.gz file to for building

  • znapzend_package_url (Stdlib::Httpurl) (defaults to: "https://github.com/oetiker/znapzend/releases/download/v${znapzend_package_version}/znapzend-${znapzend_package_version}.tar.gz")

    Specifies the URL of where to download the znapzend tar.gz file. By default, this uses the znapzend_package_version version.

  • znapzend_install_prefix (Stdlib::Unixpath) (defaults to: "/opt/znapzend-${znapzend_package_version}")

    Specifies the directory to which znapzend should be installed.

  • znapzend_installed_binaries (Array) (defaults to: [ 'znapzend', 'znapzendzetup', 'znapzendztatz', ])

    Specifies a list of znapzend programs to link.

  • znapzend_linkpath (Stdlib::Unixpath) (defaults to: '/usr/local/bin')

    Specifies where the znapzend program links should be created.



37
38
39
40
41
42
43
44
45
46
47
48
49
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
# File 'manifests/init.pp', line 37

class znapzend (
  Array                      $gcc_packages                 = [ 'gcc', 'gcc-c++', ],
  Boolean                    $manage_epel                  = true,
  Boolean                    $manage_gcc                   = true,
  Boolean                    $manage_mbuffer               = true,
  Boolean                    $manage_perl                  = true,
  Boolean                    $manage_prereqs               = true,
  Array                      $mbuffer_packages             = [ 'mbuffer', ],
  Array                      $perl_packages                = [ 'perl-core', ],
  Stdlib::Unixpath           $plan_confdir                 = '/etc/znapzend/configs',
  Boolean                    $plan_confdir_purge           = true,
  Array[Stdlib::Unixpath]    $plan_confdir_setup           = [ '/etc/znapzend', '/etc/znapzend/configs', ],
  String                     $plan_conffile_mode           = '0644',
  String                     $plan_conffile_template       = 'znapzend/plan_conffile_template.erb',
  Boolean                    $service_enable               = true,
  Enum['running', 'stopped'] $service_ensure               = 'running',
  String                     $service_name                 = 'znapzend',
  String                     $service_options              = '',
  String                     $service_options_template     = 'znapzend/znapzend.default.erb',
  Array                      $service_systemd_afters       = [ 'zfs-import-cache.service', 'zfs-import-scan.service', ],
  String                     $service_systemd_template     = 'znapzend/znapzend.service.erb',
  String                     $service_sysv_template        = 'znapzend/znapzend.sysv.erb',
  Stdlib::Unixpath           $znapzend_download_location   = '/tmp',
  String                     $znapzend_package_version     = '0.19.1',
  Stdlib::Unixpath           $znapzend_package_extractpath = '/usr/local/src',
  Stdlib::Httpurl            $znapzend_package_url         = "https://github.com/oetiker/znapzend/releases/download/v${znapzend_package_version}/znapzend-${znapzend_package_version}.tar.gz",
  Stdlib::Unixpath           $znapzend_install_prefix      = "/opt/znapzend-${znapzend_package_version}",
  Array                      $znapzend_installed_binaries  = [ 'znapzend', 'znapzendzetup', 'znapzendztatz', ],
  Stdlib::Unixpath           $znapzend_linkpath            = '/usr/local/bin',
  ) {
  case $::osfamily {
    'RedHat': {
      case $::operatingsystemmajrelease {
        '6', '7': {
          contain znapzend::repos
          contain znapzend::prereqs
          contain znapzend::install
          contain znapzend::config
          contain znapzend::service

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