Skip to content

Commit d10887d

Browse files
Add labels for the loops
Signed-off-by: Saravanan Raju <saravanan.footloose@gmail.com>
1 parent 0078f9d commit d10887d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

roles/runtime/tasks/initialize_base.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
dbc_name: "{{ item.0.name }}"
213213
use_default_dbc: "{{ item.0.use_default_dbc }}"
214214
config:
215-
name: "{{ item.1.name | default([dbc_name, run__dw_vw_suffix ,__dw_dbc_index] | join('-')) }}"
215+
name: "{{ item.1.name | default([run__namespace, run__dw_vw_suffix ,__dw_dbc_index] | join('-')) }}"
216216
dbc_name: "{{ dbc_name }}"
217217
use_default_dbc: "{{ use_default_dbc }}"
218218
vw_type: "{{ item.1.vw_type | default('hive') }}"
@@ -227,3 +227,4 @@
227227
loop: "{{ run__dw_dbc_configs | subelements('virtual_warehouses')}}"
228228
loop_control:
229229
index_var: __dw_dbc_index
230+
label: "{{ item.0.name }}"

roles/runtime/tasks/setup_aws.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
cloudera.cloud.dw_cluster:
4242
env: "{{ run__env_name }}"
4343
overlay: "{{ run__dw_overlay_network }}"
44+
private_load_balancer: "{{ run__dw_private_load_balancer }}"
4445
aws_public_subnets: "{{ run__datahub_public_subnet_ids }}"
45-
aws_private_subnets: "{{ run__datahub_private_subnet_ids }}"
46+
aws_private_subnets: "{{ run__datahub_private_subnet_ids if run__dw_private_worker_nodes else [] }}"
4647
state: present
4748
wait: yes
4849
async: 3600 # 1 hour timeout
@@ -79,6 +80,7 @@
7980
loop: "{{ run__dw_dbc_configs }}"
8081
loop_control:
8182
loop_var: __dw_dbc_config
83+
label: "{{ __dw_dbc_config.name }}"
8284
register: __dw_dbc_builds
8385

8486
- name: Wait for CDP DW Database catalogs setup to complete
@@ -92,6 +94,7 @@
9294
loop: "{{ __dw_dbc_builds.results }}"
9395
loop_control:
9496
loop_var: __dw_dbc_build
97+
label: "{{ __dw_dbc_build.__dw_dbc_config.name }}"
9598

9699
- name: Set CDP DW Database catalog name to id map
97100
when: __dw_dbc_build_async.dbcs is defined
@@ -122,6 +125,7 @@
122125
loop: "{{ run__dw_vw_configs }}"
123126
loop_control:
124127
loop_var: __dw_vw_config
128+
label: "{{ __dw_vw_config.name }}"
125129

126130
- name: Wait for CDP DW Virtual warehouse setup to complete
127131
when: __dw_vw_build.ansible_job_id is defined
@@ -134,7 +138,4 @@
134138
loop: "{{ __dw_vw_builds.results }}"
135139
loop_control:
136140
loop_var: __dw_vw_build
137-
138-
- name: Print Virtual Warehouses
139-
ansible.builtin.debug:
140-
msg: "Database Cluster : {{ __dw_vw_builds_async }}"
141+
label: "{{ __dw_vw_build.__dw_vw_config.name }}"

0 commit comments

Comments
 (0)