##### SUMMARY
See https://github.com/ansible/ansible/blob/88d8cf8197c53edd3bcdcd21429eb4c2bfbf0f6a/lib/ansible/module_utils/basic.py#L699-L706

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
lib/ansible/module_utils/basic.py

##### ANSIBLE VERSION
```paste below
2.9
devel
```

try:
            uid = int(owner)
        except ValueError:
            try:
                uid = pwd.getpwnam(owner).pw_uid
            except KeyError:
                path = to_text(b_path)
                self.fail_json(path=path, msg='chown failed: failed to look up user %s' % owner)
        if orig_uid != uid:
            if diff is not None:
                if 'before' not in diff:
                    diff['before'] = {}
                diff['before']['owner'] = orig_uid
                if 'after' not in diff:
                    diff['after'] = {}
                diff['after']['owner'] = uid
            if self.check_mode:
                return True
            try:
                os.lchown(b_path, uid, -1)
            except (IOError, OSError) as e:
                path = to_text(b_path)
                self.fail_json(path=path, msg='chown failed: %s' % (to_text(e)))
            changed = True
        return changed
    def set_group_if_different(self, path, group, changed, diff=None, expand=True):
        if group is None:
            return changed
        b_path = to_bytes(path, errors='surrogate_or_strict')
        if expand: