def install_dvdripper(): '''Install k9copy as DVD ripper''' if not exists('/etc/apt/sources.list.d/medibuntu.list'): sudo('wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list --output-document=/etc/apt/sources.list.d/medibuntu.list') apt_update() install('medibuntu-keyring', allow_unauthenticated=True) apt_update() install('libdvdcss2') install('k9copy')
def install_rabbitmq(user, password, vhost): '''Install the RabbitMQ server and add the web management plugin''' from gab.operations import create_rabbitmq_user, create_rabbitmq_vhost l = '/etc/apt/sources.list.d/rabbitmq.list' if not exists(l): sudo('echo deb http://www.rabbitmq.com/debian/ testing main > %s' % l) sudo('wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc -O - | apt-key add -') apt_update() install('rabbitmq-server', 'erlang-inets') # create the user & make it the admin create_rabbitmq_user(user, password, admin=True) # create the vhost create_rabbitmq_vhost(vhost, user) # delete guest user for safety sudo('rabbitmqctl delete_user guest') install_rabbitmq_plugins()
def install_serverdensity(url, key): ''' Install the `Server Density <http://serverdensity.com/>`_ software. :param str url: is the chosen url at Server Density: https://example.serverdensity.com :param str key: the key for the given server. You can find this in the server list at Server Density. ''' l = '/etc/apt/sources.list.d/serverdensity.list' if not exists(l): sudo('echo deb http://www.serverdensity.com/downloads/linux/debian lenny main > %s' % l) sudo('wget http://www.serverdensity.com/downloads/boxedice-public.key -O - | apt-key add -') apt_update() install('sd-agent') config = ''' [Main] sd_url: %(url)s agent_key: %(key)s ''' % {'url': url, 'key': key} append('/etc/sd-agent/config.cfg', config, use_sudo=True) start('sd-agent')