Puppet Class: nsclient::install
- Defined in:
- manifests/install.pp
Overview
Class: nsclient::install
This private class is meant to be called from ‘nsclient`. It downloads the package and installs it.
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 55 56 |
# File 'manifests/install.pp', line 10
class nsclient::install {
assert_private("You're not supposed to do that!")
$source = "${nsclient::package_source_location}/${nsclient::package_source}"
case downcase($facts['os']['family']) {
'windows': {
if $nsclient::chocolatey_provider {
package { $nsclient::params::chocolatey_package_name:
ensure => $nsclient::package_version,
provider => 'chocolatey',
}
}
else {
if ! defined(File[$nsclient::download_destination]) {
file { $nsclient::download_destination:
ensure => directory,
}
}
download_file { 'NSCP-Installer':
url => $source,
destination_directory => $nsclient::download_destination,
proxy_address => $nsclient::proxy_url,
require => File[$nsclient::download_destination],
}
package { $nsclient::package_name:
ensure => $nsclient::package_version,
source => "${nsclient::download_destination}/${nsclient::package_source}",
provider => 'windows',
install_options => [
'/quiet',
{
'INSTALLLOCATION' => $nsclient::install_path,
'CONFIGURATION_TYPE' => "ini://${nsclient::install_path}\\nsclient.ini"
},
],
require => Download_file['NSCP-Installer'],
}
}
}
default: {
fail('This module only works on Windows based systems.')
}
}
}
|