Puppet Class: stackdriver::install::windows
- Inherits:
- stackdriver
- Defined in:
- manifests/install/windows.pp
Overview
vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 foldmethod=marker
Class: stackdriver::install::windows
Installs Stackdriver Agent for Windows
Parameters
Use Hiera for overriding any parameter defaults
- installer
-
Default - /tmp/Stackdriverinstaller-0.3.exe
-
Stackdriver Windows installer
- uninstallkey
-
Default - HKLM:SoftwareWow6432NodeMicrosoftWindowsCurrentVersionUninstallStackdriverAgent
-
Registry uninstallation key created by an installed Stackdriver Agent
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 57 58 59 60 |
# File 'manifests/install/windows.pp', line 21
class stackdriver::install::windows(
$installer = '/tmp/Stackdriverinstaller-0.3.exe',
$uninstallkey = 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\StackdriverAgent',
) inherits stackdriver {
validate_string($installer)
validate_string($uninstallkey)
if ! defined(File['/tmp']) {
file { '/tmp':
ensure => 'directory',
mode => '0775',
owner => 'SYSTEM',
group => 'Administrators',
}
}
file { "C:${installer}":
ensure => file,
owner => 'SYSTEM',
group => 'Administrators',
mode => '0775',
source => "puppet:///modules/stackdriver/${::kernel}/${installer}",
require => File['/tmp'];
}
exec {
"${name}-installer":
provider => 'powershell',
logoutput => true,
timeout => 600,
# NOTE: /S for silent install (API registry key will be empty)
command => "C:${installer} /S; Start-Sleep -s 30",
unless => "if(!(Test-Path \'${uninstallkey}\')) { exit 1 } else { exit 0 }",
require => File["C:${installer}"],
}
}
|