def _get_local_groups(self):
        groups = dict()
        path = '/etc/group'
        with salt.utils.fopen(path, 'r') as fp_:
            for line in fp_:
                line = line.strip()
                if ':' not in line:
                    continue
                name, password, gid, users = line.split(':')
                groups[name] = {
                    'gid': gid,
                }

                if users:
                    groups[name]['users'] = users.split(',')

        return groups
Return all known local groups to the system.
dataset/ETHPy150Open saltstack/salt/salt/modules/inspectlib/query.py/Query._get_local_groups