|
| 1 | +--- |
| 2 | +- name: Create kustomization to update Horizon to use Federation |
| 3 | + hosts: "{{ cifmw_target_hook_host | default('localhost') }}" |
| 4 | + tasks: |
| 5 | + - name: Set urls for install type uni |
| 6 | + ansible.builtin.set_fact: |
| 7 | + cifmw_federation_keycloak_url: 'https://keycloak-openstack.apps.ocp.openstack.lab' |
| 8 | + cifmw_federation_keystone_url: 'https://keystone-public-openstack.apps.ocp.openstack.lab' |
| 9 | + cifmw_federation_horizon_url: 'https://horizon-openstack.apps.ocp.openstack.lab' |
| 10 | + when: cifmw_federation_deploy_type == "uni" |
| 11 | + |
| 12 | + - name: Set urls for install type crc |
| 13 | + ansible.builtin.set_fact: |
| 14 | + cifmw_federation_keycloak_url: 'https://keycloak-openstack.apps-crc.testing' |
| 15 | + cifmw_federation_keystone_url: 'https://keystone-public-openstack.apps-crc.testing' |
| 16 | + cifmw_federation_horizon_url: 'https://horizon-openstack.apps-crc.testing' |
| 17 | + when: cifmw_federation_deploy_type == "crc" |
| 18 | + |
| 19 | + - name: Create file to customize horizon for Federation resources deployed in the control plane |
| 20 | + ansible.builtin.copy: |
| 21 | + dest: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane/horizon_federation.yaml" |
| 22 | + content: |- |
| 23 | + apiVersion: kustomize.config.k8s.io/v1beta1 |
| 24 | + kind: Kustomization |
| 25 | + resources: |
| 26 | + - namespace: {{ namespace }} |
| 27 | + patches: |
| 28 | + - target: |
| 29 | + kind: OpenStackControlPlane |
| 30 | + name: .* |
| 31 | + patch: |- |
| 32 | + - op: add |
| 33 | + path: /spec/horizon/enabled |
| 34 | + value: true |
| 35 | + - op: add |
| 36 | + path: /spec/horizon/template/memcachedInstance |
| 37 | + value: memcached |
| 38 | + - op: add |
| 39 | + path: /spec/horizon/template/customServiceConfig |
| 40 | + value: | |
| 41 | + OPENSTACK_KEYSTONE_URL = "{{ cifmw_federation_keystone_url }}/v3" |
| 42 | + WEBSSO_ENABLED = True |
| 43 | + WEBSSO_CHOICES = ( |
| 44 | + ("credentials", _("Keystone Credentials")), |
| 45 | + ("OIDC", _("OpenID Connect")), |
| 46 | + ) |
| 47 | + WEBSSO_IDP_MAPPING = { |
| 48 | + "OIDC": ("{{ cifmw_keystone_OIDC_provider_name }}", "openid"), |
| 49 | + } |
0 commit comments