def policy_exists(vhost, name, runas=None):
 if ((runas is None) and (not salt.utils.is_windows())):
  runas = salt.utils.get_user()
 policies = list_policies(runas=runas)
 return bool(((vhost in policies) and (name in policies[vhost])))

def policy_exists ( vhost , name , runas = None ) : if ( ( runas is None ) and ( not salt . utils . is_windows ( ) ) ) : runas = salt . utils . get_user ( ) policies = list_policies ( runas = runas ) return bool ( ( ( vhost in policies ) and ( name in policies [ vhost ] ) ) )
check to see if policy exists .