def execute(self, action):
        role = action['Action'].get('_role', None)
        if not role:
            inputs = ', '.join(['%s=%r' % (k, v) for k, v in action['Action'].items()])
            print('Action(%s)' % inputs)
            return
        else:
            kwargs = {k: v for k, v in action['Action'].items() if not k.startswith('_')}
            try:
                return self.role_functions[role](**kwargs)
            except:
                _, error, _ = sys.exc_info()
                raise TaskError(repr(error), traceback.format_exc())
Creates a Postgres role. Users and Groups are both roles in postgres.
dataset/ETHPy150Open KKBOX/mass/mass/scheduler/worker.py/BaseWorker.execute--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/postgres.py/_role_create