mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #8286 from holmboe/getent-refresh
Add refresh=False to remaining user.getent
This commit is contained in:
commit
f0803fb7f7
@ -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 = []
|
||||
|
@ -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 = []
|
||||
|
@ -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 = []
|
||||
|
@ -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 = []
|
||||
|
@ -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 = []
|
||||
|
Loading…
Reference in New Issue
Block a user