Created
October 28, 2015 15:16
-
-
Save hpcprofessional/374db760c39672531b79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Directory of c:\windows\temp | |
10/28/2015 11:04 AM <DIR> . | |
10/28/2015 11:04 AM <DIR> .. | |
10/28/2015 11:04 AM 16,896 zabby-0.1.2.gem | |
10/28/2015 10:47 AM 3,340 zbx-query.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if $::Kernel == 'Linux' { | |
#On Linux, we need to take care to install into PE's ruby environment | |
package { 'zabby': | |
ensure => '0.1.2', | |
provider => 'pe_gem', | |
} | |
} | |
else { | |
#We need to stage the gem locally on Windows. | |
file { 'zabby gem' : | |
path => "${script_dir}\\zabby-0.1.2.gem", | |
ensure => present, | |
source_permissions => 'ignore', | |
source => 'puppet:///modules/checked_service/zabby/zabby-0.1.2.gem', | |
before => Package['zabby'], | |
} | |
#We can use the standard gem provider on Windows. | |
package { 'zabby': | |
ensure => '0.1.2', | |
provider => 'gem', | |
source => "${script_dir}\\zabby-0.1.2.gem", | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c:\Program Files\Puppet Labs\Puppet Enterprise\sys\ruby\bin>puppet agent -t | |
Info: Retrieving pluginfacts | |
Info: Retrieving plugin | |
Info: Loading facts | |
Info: Caching catalog for windows.puppetlabs.vm | |
Info: Applying configuration version '1446044949' | |
Error: Could not update: Invalid source '': bad URI(is not URI?): C:\Windows\Tem | |
p\zabby-0.1.2.gem | |
Wrapped exception: | |
Invalid source '': bad URI(is not URI?): C:\Windows\Temp\zabby-0.1.2.gem | |
Wrapped exception: | |
bad URI(is not URI?): C:\Windows\Temp\zabby-0.1.2.gem | |
Error: /Stage[main]/Checked_service/Package[zabby]/ensure: change from absent to | |
0.1.2 failed: Could not update: Invalid source '': bad URI(is not URI?): C:\Win | |
dows\Temp\zabby-0.1.2.gem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment