Created
January 21, 2014 12:19
-
-
Save arthurschreiber/8538997 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
exec { "download redis-${version}": | |
command => "wget --output-document redis-${version}.tar.gz https://github.com/antirez/redis/archive/${version}.tar.gz", | |
cwd => '/usr/local/src', | |
path => ['/bin', '/usr/bin'], | |
creates => "/usr/local/src/redis-${version}.tar.gz", | |
} -> exec { "extract redis-${version}": | |
command => "tar xfz redis-${version}.tar.gz", | |
cwd => '/usr/local/src', | |
path => ['/bin', '/usr/bin'], | |
creates => "/usr/local/src/redis-${version}", | |
} -> exec { "install redis-${version}": | |
command => "env ARCH= make && make install PREFIX=/opt/redis-${version}", | |
cwd => "/usr/local/src/redis-${version}", | |
path => ['/bin', '/usr/bin'], | |
creates => "/opt/redis-${version}", | |
} -> file { '/etc/init.d/redis': | |
ensure => 'file', | |
source => 'puppet:///modules/redis/redis.sh', | |
mode => '0755', | |
} -> file { '/opt/redis': | |
ensure => 'link', | |
target => "/opt/redis-${version}" | |
} ~> exec { "cp -f /usr/local/src/redis-${version}/redis.conf /etc/redis.conf": | |
refreshonly => true, | |
path => ['/bin', '/usr/bin'], | |
} | |
file { '/var/lib/redis': | |
ensure => 'directory', | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment