Skip to content

Instantly share code, notes, and snippets.

@UtahDave
Last active December 20, 2015 11:39
Show Gist options
  • Save UtahDave/6125409 to your computer and use it in GitHub Desktop.
Save UtahDave/6125409 to your computer and use it in GitHub Desktop.
Multi-line cmd.run wget->tar->rm->cd->make
'''
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