def install_s3cmd(): """ Install s3cmd on the server if it's not installed already """ if not find_executable('s3cmd') == None: return True if platform() in ['ubuntu', 'debian']: print "Installing s3cmd on the remote server" sudo('apt-get -y -q install s3cmd') return True return False
def ohai_info(): if find_executable('ohai') == None: raise Exception("Chef client not installed on the remote server") ohai_data = sudo('ohai', quiet=True) return json.loads(ohai_data)
def check_dependencies(): if find_executable('s3cmd') == None: raise Exception("s3cmd executable not found on the remote server")