saltstack-formulas/users-formula — pull request #11 by tomasfejfar (2014-01-14 15:54:06+00:00)
Title: SLS no longer fails for multiple groups

Because the group-present state was inside foreach, the resulting YAML contained duplicate groupname_group IDs. Prepending the username fixes the issue. More elegant solution would be to somehow get all the groups first and create them outside the loop (thus reducing the number of resulting state IDs from `n_users * n_groups` to `n_groups`). But I don't know how to do it and this is good enough.