def parse_openshift_version(output):
 versions = dict((e.split(' v') for e in output.splitlines() if (' v' in e)))
 ver = versions.get('openshift', '')
 ver = ver.split('-')[0]
 return ver

def parse_openshift_version ( output ) : versions = dict ( ( e . split ( ' v' ) for e in output . splitlines ( ) if ( ' v' in e ) ) ) ver = versions . get ( 'openshift' , '' ) ver = ver . split ( '-' ) [ 0 ] return ver
apply provider facts to supplied facts dict args: string: output of openshift version returns: string: the version number .