From cf0ef22ae4a6b2a8a3aeb6090d0f8dd436a5ac13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Cor=C3=A9?= Date: Thu, 17 Feb 2022 17:27:05 +0100 Subject: [PATCH] Add default EE to fix wait for sync --- playbooks/service-provision.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/playbooks/service-provision.yaml b/playbooks/service-provision.yaml index ec5d0cb1f..f935d817c 100644 --- a/playbooks/service-provision.yaml +++ b/playbooks/service-provision.yaml @@ -28,6 +28,30 @@ file: "{{ catalog_item_params_file }}" name: catalog_item_params + # RHPDS virtualenvs -> EE automatic creation + - name: Override EE with default_execution_environment if not defined + vars: + ansible_control_plane: >- + {{ vars.catalog_item_params.__meta__.ansible_control_plane.type | default('tower') }} + + execution_environment: >- + {{ vars.catalog_item_params.__meta__.deployer.execution_environment | default({}) }} + + default_execution_environment: + image: image-registry.apps-dev.open.redhat.com/agnosticd/ee-{{ vars.catalog_item_params.__meta__.deployer.virtualenv | default('ansible2.9-python3.6-2021-11-30') }} + private: true + + to_merge: + __meta__: + deployer: + execution_environment: "{{ default_execution_environment }}" + when: >- + ansible_control_plane == 'controller' + and execution_environment | default('', true) == '' + + set_fact: + catalog_item_params: "{{ vars.catalog_item_params | combine(to_merge, recursive=True) }}" + - name: Show catalog_item_params debug: var: vars.catalog_item_params