Issue #80267: Remove user not found warning (#80291)

Co-authored-by: Sebi94nbg <sebastian.kraetzig@4g-server.eu>
pull/82283/head
Sebbo94BY 6 months ago committed by GitHub
parent d664f13b4a
commit e0bf76e3db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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']

Loading…
Cancel
Save