Skip to content

Commit cf0ef22

Browse files
committed
Add default EE to fix wait for sync
1 parent 7145b6f commit cf0ef22

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

playbooks/service-provision.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,30 @@
2828
file: "{{ catalog_item_params_file }}"
2929
name: catalog_item_params
3030

31+
# RHPDS virtualenvs -> EE automatic creation
32+
- name: Override EE with default_execution_environment if not defined
33+
vars:
34+
ansible_control_plane: >-
35+
{{ vars.catalog_item_params.__meta__.ansible_control_plane.type | default('tower') }}
36+
37+
execution_environment: >-
38+
{{ vars.catalog_item_params.__meta__.deployer.execution_environment | default({}) }}
39+
40+
default_execution_environment:
41+
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') }}
42+
private: true
43+
44+
to_merge:
45+
__meta__:
46+
deployer:
47+
execution_environment: "{{ default_execution_environment }}"
48+
when: >-
49+
ansible_control_plane == 'controller'
50+
and execution_environment | default('', true) == ''
51+
52+
set_fact:
53+
catalog_item_params: "{{ vars.catalog_item_params | combine(to_merge, recursive=True) }}"
54+
3155
- name: Show catalog_item_params
3256
debug:
3357
var: vars.catalog_item_params

0 commit comments

Comments
 (0)