def uninstalled(name, password, keychain='/Library/Keychains/System.keychain', keychain_password=None):
 ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
 certs = __salt__['keychain.list_certs'](keychain)
 if ('.p12' in name):
  if (('http' in name) or ('salt' in name)):
   name = __salt__['cp.cache_file'](name)
  friendly_name = __salt__['keychain.get_friendly_name'](name, password)
 else:
  friendly_name = name
 if (friendly_name in certs):
  out = __salt__['keychain.uninstall'](friendly_name, keychain, keychain_password)
  if ('unable' not in out):
   ret['changes']['uninstalled'] = friendly_name
  else:
   ret['result'] = False
   ret['comment'] += 'Failed to uninstall {0}'.format(friendly_name)
 else:
  ret['comment'] += '{0} already uninstalled.'.format(friendly_name)
 return ret

def uninstalled ( name , password , keychain = '/Library/Keychains/System.keychain' , keychain_password = None ) : ret = { 'name' : name , 'result' : True , 'comment' : '' , 'changes' : { } } certs = __salt__ [ 'keychain.list_certs' ] ( keychain ) if ( '.p12' in name ) : if ( ( 'http' in name ) or ( 'salt' in name ) ) : name = __salt__ [ 'cp.cache_file' ] ( name ) friendly_name = __salt__ [ 'keychain.get_friendly_name' ] ( name , password ) else : friendly_name = name if ( friendly_name in certs ) : out = __salt__ [ 'keychain.uninstall' ] ( friendly_name , keychain , keychain_password ) if ( 'unable' not in out ) : ret [ 'changes' ] [ 'uninstalled' ] = friendly_name else : ret [ 'result' ] = False ret [ 'comment' ] += 'Failed to uninstall {0}' . format ( friendly_name ) else : ret [ 'comment' ] += '{0} already uninstalled.' . format ( friendly_name ) return ret
uninstalls a package name the name of the package to be uninstalled version uninstalls a specific version of the package .