Take a list of users and use the ansible user module to manage local accounts.
Password hashes for most linux distributions can be generated as documented here
linux_localusers__users:
- {user: 'localadmin', comment: 'Local Administrator', state: 'present', groups: 'wheel', password: '$6$YPQXqTxJc6IEhaSl$of8UJUO6sXkAri2920MzGySrJ.uvHFYNd0ycLtwCmngQyIjg3EY9VG3uUyAfspPOV6eMBO5sVSrBYaDFz7Hxz0'}Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: classroom
roles:
- linux_localusersGPLv3
Part of the ANTS Framework