Co-authored-by: Sebi94nbg <sebastian.kraetzig@4g-server.eu>
This commit is contained in:
@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- ansible.builtin.user - Remove user not found warning (https://github.com/ansible/ansible/issues/80267)
|
||||
@ -1070,12 +1070,6 @@ class User(object):
|
||||
exists = True
|
||||
break
|
||||
|
||||
if not exists:
|
||||
self.module.warn(
|
||||
"'local: true' specified and user '{name}' was not found in {file}. "
|
||||
"The local user account may already exist if the local account database exists "
|
||||
"somewhere other than {file}.".format(file=self.PASSWORDFILE, name=self.name))
|
||||
|
||||
return exists
|
||||
|
||||
else:
|
||||
|
||||
@ -224,8 +224,6 @@
|
||||
- name: Ensure warnings were displayed properly
|
||||
assert:
|
||||
that:
|
||||
- local_user_test_1['warnings'] | length > 0
|
||||
- local_user_test_1['warnings'] | first is search('The local user account may already exist')
|
||||
- local_user_test_5['warnings'] is search("'append' is set, but no 'groups' are specified. Use 'groups'")
|
||||
- local_existing['warnings'] is not defined
|
||||
when: ansible_facts.system in ['Linux']
|
||||
|
||||
Reference in New Issue
Block a user