For managing users on different nodes, I use a similar/customized module in Puppet, as seen here:
puppet_users_with_virtual_resources
In the example, there are two roles. If one roles has been assigned to a user, it cannot assign an additional role to the user (because the virtual resource has already been created).
In my case, I have different roles (like sudo, web-dev, mysql) and every role assign specific groups to the user.
But as already mentioned, I'm only able to assign one single role to the user. If I add another role to the user, the user will still only have one role (because the user with the groups from one role has already been assigned to the user and the resource has been created).
How can I fix this so I can assign unlimited roles to one user?