Last active
August 29, 2015 13:58
-
-
Save spuder/10425189 to your computer and use it in GitHub Desktop.
Puppet redis exec and install
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
# The case statment is running too late, it needs to run earlier | |
case $::osfamily { | |
redhat:{ | |
$redis_6390_version = 'redis-6390-2.8.7-1.x86_64.rpm' | |
notify {"Installing redhat redis from /tmp/${redis_6390_vesion}":} | |
} | |
debian:{ | |
$redis_6390_version = 'redis-6390_2.8.7_amd64.deb' | |
notify {"Installing debian redis from /tmp/${redis_6390_vesion}":} | |
} | |
default:{ | |
fail("${::operatingsystem} not supported yet") | |
} | |
} | |
exec { 'wget redis': | |
command => "/usr/bin/wget http://foo.bar/redis/${redis_6390_version} -O /tmp/${redis_6390_version}", | |
#creates => "/tmp/${redis_6390_version}", | |
#before => Package['redis-6390'], | |
} | |
notify {"Installing redis from /tmp/${redis_6390_vesion}":} | |
package {'redis-6390': | |
ensure => installed, | |
source => "/tmp/${redis_6390_version}" | |
# source => 'http://foo.bar/redis/redis-6390-2.8.7-1.x86_64.rpm', | |
# name => 'redis-6390-2.8.7-1.x86_64.rpm', | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the output, notice that the message "Installing redis from /tmp/" appears before the message "Installing redhat redis from /tmp'.
Also, I suspect that the reason the package is failing is because it can't find the location of the rpm