diff --git a/roles/kustomize_deploy/README.md b/roles/kustomize_deploy/README.md index 0cd373b7a8..c94068e09a 100644 --- a/roles/kustomize_deploy/README.md +++ b/roles/kustomize_deploy/README.md @@ -101,6 +101,7 @@ with a message. Some tasks uses timeouts when applying or waiting for resources. Those timeouts can be controlled by: * `cifmw_kustomize_deploy_delay`: (Int) Ansible `delay` passed to tasks that waits for a resource to reach a target state (default `10`) +* `cifmw_kustomize_deploy_retries_subscription`: (Int) Ansible `retries` passed to tasks that wait for the Subscription (default `90`) * `cifmw_kustomize_deploy_retries_install_plan`: (Int) Ansible `retries` passed to tasks that wait for the InstallPlan (default `60`) ### Task tagging diff --git a/roles/kustomize_deploy/defaults/main.yml b/roles/kustomize_deploy/defaults/main.yml index 8b42ff26d0..653c4440c9 100644 --- a/roles/kustomize_deploy/defaults/main.yml +++ b/roles/kustomize_deploy/defaults/main.yml @@ -222,6 +222,7 @@ cifmw_kustomize_deploy_dp_dest_file: >- # timeouts and retry configuration cifmw_kustomize_deploy_delay: 10 +cifmw_kustomize_deploy_retries_subscription: 90 cifmw_kustomize_deploy_retries_install_plan: 60 # Default retry settings for k8s_info operations to handle transient auth failures diff --git a/roles/kustomize_deploy/tasks/install_operators.yml b/roles/kustomize_deploy/tasks/install_operators.yml index fcf3650b4a..d4a76c7367 100644 --- a/roles/kustomize_deploy/tasks/install_operators.yml +++ b/roles/kustomize_deploy/tasks/install_operators.yml @@ -91,9 +91,9 @@ src: "{{ cifmw_kustomize_deploy_olm_dest_file }}" register: _cifmw_kustomize_deploy_olm_apply_out - - name: Wait for the openstack operators InstallPlan to be created + - name: Wait for the openstack operators Subscription to be created vars: - _cifmw_kustomize_deploy_olm_osp_operator_sub: >- + _cifmw_kustomize_deploy_olm_osp_operator_subscription: >- {{ ( _cifmw_kustomize_deploy_olm_apply_out.result.results | @@ -108,18 +108,18 @@ kubeconfig: "{{ cifmw_openshift_kubeconfig }}" api_key: "{{ cifmw_openshift_token | default(omit) }}" context: "{{ cifmw_openshift_context | default(omit) }}" - api_version: "{{ _cifmw_kustomize_deploy_olm_osp_operator_sub.apiVersion }}" + api_version: "{{ _cifmw_kustomize_deploy_olm_osp_operator_subscription.apiVersion }}" kind: Subscription - namespace: "{{ _cifmw_kustomize_deploy_olm_osp_operator_sub.metadata.namespace }}" - name: "{{ _cifmw_kustomize_deploy_olm_osp_operator_sub.metadata.name }}" - register: _cifmw_kustomize_deploy_olm_osp_operator_sub_out - retries: "{{ cifmw_kustomize_deploy_retries_install_plan }}" + namespace: "{{ _cifmw_kustomize_deploy_olm_osp_operator_subscription.metadata.namespace }}" + name: "{{ _cifmw_kustomize_deploy_olm_osp_operator_subscription.metadata.name }}" + register: _cifmw_kustomize_deploy_olm_osp_operator_subscription_out + retries: "{{ cifmw_kustomize_deploy_retries_subscription }}" delay: "{{ cifmw_kustomize_deploy_delay }}" until: - - _cifmw_kustomize_deploy_olm_osp_operator_sub_out.failed is false - - _cifmw_kustomize_deploy_olm_osp_operator_sub_out.resources is defined - - _cifmw_kustomize_deploy_olm_osp_operator_sub_out.resources | length == 1 - - (_cifmw_kustomize_deploy_olm_osp_operator_sub_out.resources | first)['status']['installPlanRef'] is defined + - _cifmw_kustomize_deploy_olm_osp_operator_subscription_out.failed is false + - _cifmw_kustomize_deploy_olm_osp_operator_subscription_out.resources is defined + - _cifmw_kustomize_deploy_olm_osp_operator_subscription_out.resources | length == 1 + - (_cifmw_kustomize_deploy_olm_osp_operator_subscription_out.resources | first)['status']['installPlanRef'] is defined - name: Install plan ansible.builtin.include_tasks: install_plan.yml @@ -131,7 +131,7 @@ vars: _install_plan: >- {{ - (_cifmw_kustomize_deploy_olm_osp_operator_sub_out.resources | first).status.installPlanRef + (_cifmw_kustomize_deploy_olm_osp_operator_subscription_out.resources | first).status.installPlanRef }} kubernetes.core.k8s_info: kubeconfig: "{{ cifmw_openshift_kubeconfig }}"