def remove_tap(module, brew_path, tap):
 (failed, changed, msg) = (False, False, '')
 if (not a_valid_tap(tap)):
  failed = True
  msg = ('not a valid tap: %s' % tap)
 elif already_tapped(module, brew_path, tap):
  if module.check_mode:
   module.exit_json(changed=True)
  (rc, out, err) = module.run_command([brew_path, 'untap', tap])
  if (not already_tapped(module, brew_path, tap)):
   changed = True
   msg = ('successfully untapped: %s' % tap)
  else:
   failed = True
   msg = ('failed to untap: %s' % tap)
 else:
  msg = ('already untapped: %s' % tap)
 return (failed, changed, msg)

def remove_tap ( module , brew_path , tap ) : ( failed , changed , msg ) = ( False , False , '' ) if ( not a_valid_tap ( tap ) ) : failed = True msg = ( 'not a valid tap: %s' % tap ) elif already_tapped ( module , brew_path , tap ) : if module . check_mode : module . exit_json ( changed = True ) ( rc , out , err ) = module . run_command ( [ brew_path , 'untap' , tap ] ) if ( not already_tapped ( module , brew_path , tap ) ) : changed = True msg = ( 'successfully untapped: %s' % tap ) else : failed = True msg = ( 'failed to untap: %s' % tap ) else : msg = ( 'already untapped: %s' % tap ) return ( failed , changed , msg )
removes a single tap .