def default_keychain(name, domain='user', user=None):
 ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
 if (not os.path.exists(name)):
  ret['result'] = False
  ret['comment'] += 'Keychain not found at {0}'.format(name)
 else:
  out = __salt__['keychain.get_default_keychain'](user, domain)
  if (name in out):
   ret['comment'] += '{0} was already the default keychain.'.format(name)
  else:
   out = __salt__['keychain.set_default_keychain'](name, domain, user)
   if (len(out) == 0):
    ret['changes']['default'] = name
   else:
    ret['result'] = False
    ret['comment'] = 'Failed to install keychain. {0}'.format(out)
 return ret

def default_keychain ( name , domain = 'user' , user = None ) : ret = { 'name' : name , 'result' : True , 'comment' : '' , 'changes' : { } } if ( not os . path . exists ( name ) ) : ret [ 'result' ] = False ret [ 'comment' ] += 'Keychain not found at {0}' . format ( name ) else : out = __salt__ [ 'keychain.get_default_keychain' ] ( user , domain ) if ( name in out ) : ret [ 'comment' ] += '{0} was already the default keychain.' . format ( name ) else : out = __salt__ [ 'keychain.set_default_keychain' ] ( name , domain , user ) if ( len ( out ) == 0 ) : ret [ 'changes' ] [ 'default' ] = name else : ret [ 'result' ] = False ret [ 'comment' ] = 'Failed to install keychain. {0}' . format ( out ) return ret
set the default keychain to use name the chain in which to use as the default domain the domain to use valid values are user|system|common|dynamic .