diff --git a/ansible/roles_ocp_workloads/ocp4_workload_rhacm/tasks/workload.yml b/ansible/roles_ocp_workloads/ocp4_workload_rhacm/tasks/workload.yml index d411b6814b0..23d594ceb9d 100644 --- a/ansible/roles_ocp_workloads/ocp4_workload_rhacm/tasks/workload.yml +++ b/ansible/roles_ocp_workloads/ocp4_workload_rhacm/tasks/workload.yml @@ -11,14 +11,15 @@ - name: Update Router for Wildcards for HCP Hosted Clusters when: ocp4_workload_rhacm_enable_wildcards | bool kubernetes.core.k8s_json_patch: + api_version: operator.openshift.io/v1 kind: IngressController namespace: openshift-ingress-operator name: default patch: - - op: add - path: /spec/routeAdmission - value: - wildcardPolicy: WildcardsAllowed + - op: add + path: '/spec/routeAdmission' + value: + wildcardPolicy: WildcardsAllowed - name: Install RHACM operator ansible.builtin.include_role: @@ -37,7 +38,7 @@ install_operator_catalogsource_image: "{{ ocp4_workload_rhacm_catalog_source_image | default('') }}" install_operator_catalogsource_image_tag: "{{ ocp4_workload_rhacm_catalog_source_tag | default('') }}" install_operator_manage_namespaces: - - open-cluster-management + - open-cluster-management - name: Ensure RHACM MultiClusterHub is present kubernetes.core.k8s: @@ -58,12 +59,12 @@ retries: 120 delay: 10 until: - - rhacm_multiclusterhub is defined - - rhacm_multiclusterhub.resources is defined - - rhacm_multiclusterhub.resources | length > 0 - - rhacm_multiclusterhub.resources[0].status is defined - - rhacm_multiclusterhub.resources[0].status.phase is defined - - rhacm_multiclusterhub.resources[0].status.phase == "Running" + - rhacm_multiclusterhub is defined + - rhacm_multiclusterhub.resources is defined + - rhacm_multiclusterhub.resources | length > 0 + - rhacm_multiclusterhub.resources[0].status is defined + - rhacm_multiclusterhub.resources[0].status.phase is defined + - rhacm_multiclusterhub.resources[0].status.phase == "Running" # RHACM Console route only exists for RHACM 2.6 and earlier - name: Get the RHACM console route @@ -92,24 +93,24 @@ - name: For RHACM 2.6 and earlier save route to RHACM Console when: r_acm_console_route.resources | length > 0 block: - - name: Set fact for RHACM route - ansible.builtin.set_fact: - acm_route: "{{ r_acm_console_route | json_query(route_query) }}" - vars: - - route_query: resources[].spec.host|[0] + - name: Set fact for RHACM route + ansible.builtin.set_fact: + acm_route: "{{ r_acm_console_route | json_query(route_query) }}" + vars: + - route_query: resources[].spec.host|[0] - - name: Print user info - agnosticd_user_info: - msg: "{{ item }}" - loop: - - "" - - "Your RHACM console is available at:" - - " https://{{ acm_route }}" + - name: Print user info + agnosticd_user_info: + msg: "{{ item }}" + loop: + - "" + - "Your RHACM console is available at:" + - " https://{{ acm_route }}" - - name: Save user data (RHACM Console) - agnosticd_user_info: - data: - acm_route: "https://{{ r_acm_console_route.resources[0].spec.host }}" + - name: Save user data (RHACM Console) + agnosticd_user_info: + data: + acm_route: "https://{{ r_acm_console_route.resources[0].spec.host }}" - name: Save user data agnosticd_user_info: @@ -119,9 +120,9 @@ - name: Write out AWS credentials if deployed to EC2 sandbox when: - - cloud_provider == 'ec2' - - hostvars.localhost.cloudformation_out_final.stack_outputs.StudentUserAccessKey is defined - - hostvars.localhost.cloudformation_out_final.stack_outputs.StudentUserSecretAccessKey is defined + - cloud_provider == 'ec2' + - hostvars.localhost.cloudformation_out_final.stack_outputs.StudentUserAccessKey is defined + - hostvars.localhost.cloudformation_out_final.stack_outputs.StudentUserSecretAccessKey is defined ansible.builtin.include_tasks: aws_credentials.yml # Leave this as the last task in the playbook.