Puppet Class: stackify::install

Inherits:
stackify::params
Defined in:
manifests/install.pp

Overview

Installs stackify

Parameters:

  • package_install_options_activationkey (String)
  • package_install_options_environment (String)
  • package_install_options_device_alias (String) (defaults to: $stackify::params::package_install_options_device_alias)
  • package_install_options_attach_all (Boolean) (defaults to: $stackify::params::package_install_options_attach_all)
  • package_install_options_enable_profiler (Boolean) (defaults to: $stackify::params::package_install_options_enable_profiler)
  • package_install_options_enable_ipmask (Boolean) (defaults to: $stackify::params::package_install_options_enable_ipmask)
  • package_ensure (String) (defaults to: $stackify::params::package_ensure)
  • package_name (String) (defaults to: $stackify::params::package_name)
  • file_download_directory (String) (defaults to: $stackify::params::file_download_directory)
  • file_download_absolute_path (Stdlib::Absolutepath) (defaults to: $stackify::params::file_download_absolute_path)
  • file_download_source (String) (defaults to: $stackify::params::file_download_source)


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
# File 'manifests/install.pp', line 2

class stackify::install(
  String $package_install_options_activationkey,
  String $package_install_options_environment,
  String $package_install_options_device_alias = $stackify::params::package_install_options_device_alias,
  Boolean $package_install_options_attach_all = $stackify::params::package_install_options_attach_all,
  Boolean $package_install_options_enable_profiler = $stackify::params::package_install_options_enable_profiler,
  Boolean $package_install_options_enable_ipmask = $stackify::params::package_install_options_enable_ipmask,
  String $package_ensure = $stackify::params::package_ensure,
  String $package_name = $stackify::params::package_name,
  String $file_download_directory = $stackify::params::file_download_directory,
  Stdlib::Absolutepath $file_download_absolute_path = $stackify::params::file_download_absolute_path,
  String $file_download_source = $stackify::params::file_download_source,
) inherits stackify::params {

  if ! defined(File[$file_download_directory]) {
    file { $file_download_directory:
      ensure => directory, # Unfortunately i need to not clean this up ever
    }
  }

  file { $file_download_absolute_path:
    ensure  => present,
    source  => $file_download_source,
    require => File[$file_download_directory],
  }

  if empty($package_install_options_environment) {
    fail('The Environment variable was not provided.  This is a required parameter.')
  }
  $package_install_options_attach_all_integer = bool2num($package_install_options_attach_all)
  $package_install_options_enable_profiler_integer = bool2num($package_install_options_enable_profiler)
  $package_install_options_enable_enable_ipmask_integer = bool2num($package_install_options_enable_ipmask)
  $package_install_options =  [
      '/s',
      "/v\"ACTIVATIONKEY=${package_install_options_activationkey}",
      "ENVIRONMENT=\"${package_install_options_environment}\"",
      "DEVICEALIAS=\"${package_install_options_device_alias}\"",
      "IPMASK=${package_install_options_enable_enable_ipmask_integer}",
      "ENABLEPROFILER=${package_install_options_enable_profiler_integer}",
      'ENABLEREMOTE=True',
      'RESTARTIIS=0',
      "ATTACHALL=${package_install_options_attach_all_integer}",
      '/qn' ,
      '/l*v',
      'C:\StackifyInstallLog.txt"' ]

  package { $package_name:
    ensure          => $package_ensure,
    source          => $file_download_absolute_path,
    install_options => $package_install_options,
    provider        => 'windows',
  }
}