diff --git a/ansible/roles/service-ks-register/tasks/main.yml b/ansible/roles/service-ks-register/tasks/main.yml index 5620d6598e..8e54baa0da 100644 --- a/ansible/roles/service-ks-register/tasks/main.yml +++ b/ansible/roles/service-ks-register/tasks/main.yml @@ -107,15 +107,16 @@ module_args: user: "{{ item.user }}" role: "{{ item.role }}" - project: "{{ item.project }}" - domain: "{{ service_ks_register_domain }}" + project: "{{ item.project | default(omit) }}" + domain: "{{ item.domain | default(omit) }}" + system: "{{ item.system | default(omit) }}" region_name: "{{ service_ks_register_region_name }}" auth: "{{ service_ks_register_auth }}" interface: "{{ service_ks_register_interface }}" cacert: "{{ service_ks_cacert }}" with_items: "{{ service_ks_register_users + service_ks_register_user_roles }}" loop_control: - label: "{{ item.user }} -> {{ item.project }} -> {{ item.role }}" + label: "{{ item.user }} -> {{ item.project | default(item.domain) | default(item.system) }} -> {{ item.role }}" register: service_ks_register_result until: service_ks_register_result is success retries: "{{ service_ks_register_retries }}" diff --git a/releasenotes/notes/update-user-role-assignments-c8e487445a6cadef.yaml b/releasenotes/notes/update-user-role-assignments-c8e487445a6cadef.yaml new file mode 100644 index 0000000000..68904b9b08 --- /dev/null +++ b/releasenotes/notes/update-user-role-assignments-c8e487445a6cadef.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + User role assignments can now customise domain and system scopes.