|
4 | 4 | include_vars: |
5 | 5 | file: pull-secrets.vault |
6 | 6 |
|
7 | | -# Adjust the Keycloak realm? |
8 | | - |
9 | | -- name: Adjust keycloak realm |
10 | | - block: |
11 | | - |
12 | | - # Configure the Fragnet Search UI Keycloak Client. |
13 | | - # |
14 | | - # The user is assumed to have created a realm |
15 | | - # and we simply need to add a Role to that realm and then |
16 | | - # register the Fragnet Search Client. |
17 | | - |
18 | | - - name: Set client address |
19 | | - set_fact: |
20 | | - fs_client_hostname: "{{ fs_location['ui'].hostname }}{{ fs_location['ui'].path }}" |
21 | | - |
22 | | - - name: Display client address |
23 | | - debug: |
24 | | - var: fs_client_hostname |
25 | | - |
26 | | - - import_tasks: get-keycloak-realm-manager-credentials.yaml |
27 | | - vars: |
28 | | - realm_name: "{{ fs_realm }}" |
29 | | - realm_namespace: "{{ ir_namespace }}" |
30 | | - |
31 | | - - name: Add realm roles |
32 | | - include_role: |
33 | | - name: informaticsmatters.infrastructure_user |
34 | | - vars: |
35 | | - iu_action: create |
36 | | - iu_type: role |
37 | | - iu_hostname: "{{ keycloak_server_url|urlsplit('hostname') }}" |
38 | | - iu_realm: "{{ fs_realm }}" |
39 | | - iu_realm_manager: "{{ keycloak_realm_manager_fact }}" |
40 | | - iu_realm_manager_password: "{{ keycloak_realm_manager_password_fact }}" |
41 | | - iu_roles: |
42 | | - - name: fragnet-search |
43 | | - |
44 | | - - name: Add Keycloak Fragnet Search Client |
45 | | - keycloak_client: |
46 | | - auth_client_id: admin-cli |
47 | | - auth_keycloak_url: "{{ keycloak_server_url }}" |
48 | | - auth_realm: "{{ fs_realm }}" |
49 | | - auth_username: "{{ keycloak_realm_manager_fact }}" |
50 | | - auth_password: "{{ keycloak_realm_manager_password_fact }}" |
51 | | - realm: "{{ fs_realm }}" |
52 | | - client_id: "{{ fs_keycloak_client_id }}" |
53 | | - protocol: openid-connect |
54 | | - base_url: https://{{ fs_client_hostname }} |
55 | | - web_origins: |
56 | | - - https://{{ fs_client_hostname }} |
57 | | - redirect_uris: |
58 | | - - https://{{ fs_client_hostname }}/* |
59 | | - public_client: yes |
60 | | - service_accounts_enabled: yes |
61 | | - direct_access_grants_enabled: yes |
62 | | - standard_flow_enabled: yes |
63 | | - default_roles: |
64 | | - - fragnet-search |
65 | | - delegate_to: localhost |
66 | | - |
67 | | - when: fs_alter_realm|bool |
68 | | - |
69 | 7 | # Create secret objects for each image pull secret defined. |
70 | 8 | # These are typically used to pull container images |
71 | 9 | # from private registries. |
|
81 | 19 |
|
82 | 20 | - name: Deploy Fragnet UI objects |
83 | 21 | k8s: |
84 | | - definition: "{{ lookup('template', '{{ item }}.yaml.j2') }}" |
| 22 | + definition: "{{ lookup('template', item) }}" |
85 | 23 | wait: yes |
86 | 24 | wait_timeout: "{{ fs_pod_ready_timeout }}" |
87 | 25 | loop: |
88 | | - - configmap-common |
89 | | - - configmap-ui |
90 | | - - deployment-ui |
| 26 | + - configmap-common.yaml.j2 |
| 27 | + - configmap-ui.yaml.j2 |
| 28 | + - deployment-ui.yaml.j2 |
0 commit comments