copy of original dump_roles.py with extra info /logic