class nsclient ($nagiosservers) {
if ($operatingsystem == "windows") {
file { 'C:/NSClient':
ensure => directory,
owner => 'Administrator',
mode => '0755',
}
file { 'C:/NSClient/NSClient-0.3.9-x64.msi':
ensure => present,
owner => 'Administrator',
mode => '0755',
source => "puppet:///modules/nsclient/NSClient-0.3.9-x64.msi",
require => File['C:/NSClient'],
}
package { 'NSClient++ (x64)':
ensure => installed,
provider => 'windows',
source => "C:\\NSClient\\NSClient-0.3.9-x64.msi",
require => File['C:/NSClient/NSClient-0.3.9-x64.msi'],
}
service { 'NSClient++ (x64)':
ensure => running,
enable => true,
require => Package['NSClient++ (x64)'],
}
file { 'C:/Program Files/NSClient++/NSC.ini':
ensure => file,
owner => 'Administrator',
mode => '0755',
content => template("nsclient/NSC.ini.erb"),
require => Package['NSClient++ (x64)'],
notify => Service['NSClient++ (x64)'],
}
file { 'C:/Program Files/NSClient++/scripts/check_bkp.bat':
ensure => file,
owner => 'SYSTEM',
mode => '0755',
source => 'puppet:///modules/nsclient/check_bkp.bat',
require => Package['NSClient++ (x64)'],
}
}
else {
fail('This module is only supported on windows')
}
}
I get the following errors during the initial run
Info: /Stage[main]/Nsclient/File[C:/Program Files/NSClient++/NSC.ini]:
Scheduling refresh of Service[NSClient++ (x64)]
Error: /Stage[main]/Nsclient/Service[NSClient++ (x64)]: Could not evaluate:
Cannot get status of NSClient++ (x64), error was: The specified service
does not exist as an installed service.
Error: /Stage[main]/Nsclient/Service[NSClient++ (x64)]: Failed to call
refresh: Cannot get status of NSClient++ (x64), error was: The specified
service does not exist as an installed service.
Error: /Stage[main]/Nsclient/Service[NSClient++ (x64)]: Cannot get status
of NSClient++ (x64), error was: The specified service does not exist as an
installed service.
If I run the following to list the services
sc queryex type= service state= all | find "DISPLAY_NAME"
There is a row that says "DISPLAY_NAME: NSClient++ (x64)" so the service is
there puppet is just not starting it.
any more runs of the agent return this error
Error: /Stage[main]/Nsclient/Service[nsclient]: Could not evaluate: Cannot
get status of NSClient++ (x64), error was: The specified service does not
exist as an installed service.
puppetmaster : 3.2.3
puppet agent : 3.1.1
Is there something wrong with my config or is puppet having a hard time
with the special characters in the service display name ?
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/4d96e34c-4cad-4472-aab5-c5137768e71a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.