The populate-users role overwrites `identities` inventory variables
paulbarfuss opened this issue · 0 comments
paulbarfuss commented
We ran into an issue where we wanted to set identities.targets
to idm
and found that the populate-users
role is overwriting the identities
dictionary when setting identities.groups
and identities.users
set_fact:
identities:
users: "{{ lookup('csvtojson', 'file=' + csv_doc_file_name + ' var=users') }}"
groups: "{{ lookup('csvtojson', 'file=' + csv_doc_file_name + ' var=user_groups') }}"
From discussions are the issue, it would be desirable to have any imported users and groups (in this case from a csv file) merged with any static inventory users and groups. This would need to happen without overwriting other keys, such as targets
and roles
.