Merge pull request #8286 from holmboe/getent-refresh

Add refresh=False to remaining user.getent
This commit is contained in:
Joseph Hall 2013-11-05 16:19:13 -08:00
commit f0803fb7f7
5 changed files with 10 additions and 10 deletions

View File

@ -151,7 +151,7 @@ def delete(name, *args):
return _dscl('/Users/{0}'.format(name), ctype='delete')['retcode'] == 0
def getent():
def getent(refresh=False):
'''
Return the list of all info for all users
@ -161,7 +161,7 @@ def getent():
salt '*' user.getent
'''
if 'user.getent' in __context__:
if 'user.getent' in __context__ and not refresh:
return __context__['user.getent']
ret = []

View File

@ -137,7 +137,7 @@ def delete(name, remove=False, force=False):
return not ret['retcode']
def getent():
def getent(refresh=False):
'''
Return the list of all info for all users
@ -147,7 +147,7 @@ def getent():
salt '*' user.getent
'''
if 'user.getent' in __context__:
if 'user.getent' in __context__ and not refresh:
return __context__['user.getent']
ret = []

View File

@ -156,7 +156,7 @@ def delete(name, remove=False, force=False):
return not ret['retcode']
def getent():
def getent(refresh=False):
'''
Return the list of all info for all users
@ -166,7 +166,7 @@ def getent():
salt '*' user.getent
'''
if 'user.getent' in __context__:
if 'user.getent' in __context__ and not refresh:
return __context__['user.getent']
ret = []

View File

@ -198,7 +198,7 @@ def delete(name, remove=False, force=False):
return False
def getent():
def getent(refresh=False):
'''
Return the list of all info for all users
@ -208,7 +208,7 @@ def getent():
salt '*' user.getent
'''
if 'user.getent' in __context__:
if 'user.getent' in __context__ and not refresh:
return __context__['user.getent']
ret = []

View File

@ -325,7 +325,7 @@ def list_groups(name):
return sorted(list(ugrp))
def getent():
def getent(refresh=False):
'''
Return the list of all info for all users
@ -335,7 +335,7 @@ def getent():
salt '*' user.getent
'''
if 'user.getent' in __context__:
if 'user.getent' in __context__ and not refresh:
return __context__['user.getent']
ret = []