ansible roles create users

Hey guys!!

I have some requirement where i need to create bunch of user and groups using ansible roles. can you help me what is best way to do this?

1 ) Create following group

a) dev
b) qa
c) devops

  1. There is list of users and defined group respectively over here : roles/usermanage/var/main.yml
    dev:
  • ryan
  • sarah
    qa:
  • gayle
  • alfraid
    devops:
  • amber
  • zing

Please advise how to write playbooks/roles/task?