Ejemplo n.º 1
0
 def install(self, **kwargs):
     start_msg('----- Running installation for: "{0}":'.format(self.name))
     cmd = self.info['yum'] if has_yum() else self.info['apt']
     result = sudo(cmd, warn_only=True)
     if result.failed:
         raise HaltError('Failed to install: "{0}".'.format(self.name))
     succeed_msg('Installed "{0}" successfully.'.format(self.name))
Ejemplo n.º 2
0
def install_internal(name):
    start_msg('----- Running installation for: "{0}":'.format(name))

    info = cfg().tool_info(name)
    if not info:
        raise HaltError('No tool information available for: "{0}"'.format(name))

    cmd = info["yum"] if has_yum() else info["apt"]
    result = sudo(cmd, warn_only=True)
    if result.failed:
        raise HaltError('Failed to install: "{0}".'.format(name))
    succeed_msg('Installed "{0}" successfully.'.format(name))