Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- name: Rotate OpenShift Cloud Credentials
ansible.builtin.shell: |
set -o pipefail && \
cat {{ clouds_yaml_file_path }} | sed 's/{{ user_cloud }}:/openstack:/' | \
cat {{ clouds_yaml_file_path }} | sed '/^---$/d' | sed 's/{{ user_cloud }}:/openstack:/' | \
oc set data -n kube-system secret/openstack-credentials clouds.yaml=-
environment:
KUBECONFIG: "{{ kubeconfig }}"
Expand All @@ -29,8 +29,10 @@
changed_when: false

- name: Parse OCP credentials
vars:
parsed_yaml: "{{ ocp_creds_output.stdout | from_yaml }}"
ansible.builtin.set_fact:
ocp_creds: "{{ ocp_creds_output.stdout | from_yaml }}"
ocp_creds: "{{ (parsed_yaml is mapping) | ternary(parsed_yaml, parsed_yaml[0]) }}"

- name: Verify credentials rotated to application credentials
ansible.builtin.assert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
installcfg_api_vips: "{{ ocp_deployment_topology.primary_ip_protocol == 'ipv6' }}"
installcfg_api_floating_ip: "{{ precreated_api_fip }}"
installcfg_ingress_floating_ip: "{{ precreated_ingress_fip }}"
installcfg_machines_subnet: "{{ machines_subnet_id | default(omit) }}"
installcfg_machines_subnet: "{{ machines_subnet_id | default('') }}"
installcfg_cluster_network: "{{ ocp_deployment_topology[ocp_deployment_topology.primary_ip_protocol].cluster_network }}"
installcfg_service_network: "{{ ocp_deployment_topology[ocp_deployment_topology.primary_ip_protocol].service_network }}"
installcfg_default_machine_platform: "{{ ocp_deployment_topology.defaultMachinePlatform | default({}) }}"
installcfg_cluster_os_image_properties: "{{ ocp_deployment_topology.platform.openstack.clusterOSImageProperties | default({}) }}"
installcfg_additional_trust_bundle: "{{ _cacert_content.stdout_lines | default(omit) }}"
installcfg_additional_trust_bundle: "{{ _cacert_content.stdout_lines | default([]) }}"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ platform:
{{ key }}: {{ value }}
{%- endfor +%}
{%- endif +%}
{%- if installcfg_machines_subnet is defined +%}
{%- if installcfg_machines_subnet +%}
machinesSubnet: {{ installcfg_machines_subnet }}
{%- endif +%}
{%- if installcfg_api_vips +%}
Expand All @@ -64,15 +64,15 @@ platform:
externalNetwork: "{{ installcfg_external_network }}"
apiFloatingIP: "{{ installcfg_api_floating_ip }}"
ingressFloatingIP: "{{ installcfg_ingress_floating_ip }}"
{%- if installcfg_machines_subnet is not defined +%}
{%- if not installcfg_machines_subnet +%}
externalDNS: {{ installcfg_dns_servers }}
{%- endif +%}
{%- endif +%}
pullSecret: |
{{ ocp_pull_secret }}
sshKey: |
{{ ocp_public_key }}
{%- if installcfg_additional_trust_bundle is defined +%}
{%- if installcfg_additional_trust_bundle +%}
additionalTrustBundle: |
{% for line in installcfg_additional_trust_bundle %}
{{ line }}
Expand Down