Skip to content

Instantly share code, notes, and snippets.

@sarasfox
Forked from UtahDave/mult-line cmd.run
Created October 4, 2013 04:20
Show Gist options
  • Save sarasfox/6820885 to your computer and use it in GitHub Desktop.
Save sarasfox/6820885 to your computer and use it in GitHub Desktop.
'''
Redhost functionality
'''
# Import salt libs
import salt.utils
def install_redis():
'''
Installs redis from source
CLI Example::
salt '*' redhost.install_redis
'''
cmds = ('wget http://redis.googlecode.com/files/redis-2.6.13.tar.gz;'
'tar xzf redis-2.6.13.tar.gz;'
'rm redis-2.6.13.tar.gz;'
'cd redis-2.6.13;'
'make;')
return __salt__['cmd.run'](cmds,
cwd='/opt',
shell='/bin/bash')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment