Return error when gid_from_name and group does not exist.

Fixes #45345
This commit is contained in:
Pablo Suárez Hernández 2018-01-10 11:59:33 +00:00
parent ce7b1f4baf
commit a18dbe0c11
No known key found for this signature in database
GPG key ID: A9683F02B512C911

View file

@ -459,6 +459,11 @@ def present(name,
if gid_from_name:
gid = __salt__['file.group_to_gid'](name)
if not gid:
ret['comment'] = 'Default group with name "{0}" ' \
'is not present'.format(name)
ret['result'] = False
return ret
changes = _changes(name,
uid,