lueschem / edi

Embedded development infrastructure.
https://www.get-edi.io
GNU Lesser General Public License v3.0
40 stars 12 forks source link

Add the local users group only when it doesn't exits, fixes #43 #46

Closed randombenj closed 5 years ago

randombenj commented 5 years ago

Didn't try it with the ansible group_names variable, because we are dealing with ids here and not names: https://docs.ansible.com/ansible/2.5/user_guide/playbooks_variables.html#magic-variables-and-how-to-access-information-about-other-hosts

lueschem commented 5 years ago

Many thanks! The fix is absolutely needed and your changes go into the right direction. After some additional thoughts I came to the conclusion that there could be an additional corner case: The gid exists but has a different group name (in this case we should really not reuse the existing group). After all I think that edi should just provide the required group name. Does this change also fix the issue for your case? https://github.com/lueschem/edi/commit/93ff6b0c564aff2a1211bf8ab9911566cc9472fd