mirror of
https://github.com/ansible/ansible.git
synced 2026-08-06 16:12:27 +02:00
group: remove extraneous warning (#81557)
* remove extraneous warning shown when group does not exist Fixes: #77049 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
---
|
||||
minor_changes:
|
||||
- group - remove extraneous warning shown when user does not exist (https://github.com/ansible/ansible/issues/77049).
|
||||
@@ -227,14 +227,7 @@ class Group(object):
|
||||
if line.startswith(to_bytes(name_test)):
|
||||
exists = True
|
||||
break
|
||||
|
||||
if not exists:
|
||||
self.module.warn(
|
||||
"'local: true' specified and group was not found in {file}. "
|
||||
"The local group may already exist if the local group database exists somewhere other than {file}.".format(file=self.GROUPFILE))
|
||||
|
||||
return exists
|
||||
|
||||
else:
|
||||
try:
|
||||
if grp.getgrnam(self.name):
|
||||
|
||||
Reference in New Issue
Block a user