5252 ansible.builtin.set_fact :
5353 run__cdp_datalake_version : " {{ __cdp_datalake_version_info.versions[0].runtimeVersion | trim }}"
5454
55+ # TODO Discover version if upstream is not present
5556- name : Set fact for CDP Datalake version by assignment
5657 when : plat__cdp_datalake_version is defined
5758 ansible.builtin.set_fact :
165166- name : Prepare for CDP DW experiences
166167 when : run__include_dw
167168 block :
168- - name : Construct CDP DW Data catalog configurations
169+ - name : Construct CDP DW Data Catalog configurations
169170 ansible.builtin.set_fact :
170171 run__dw_dbc_configs : " {{ run__dw_dbc_configs | default([]) | union([config]) }}"
171172 vars :
179180 loop_var : __dw_config
180181 index_var : __dw_config_index
181182
182- - name : Construct CDP DW Virtual warehouse configurations
183+ - name : Construct CDP DW Virtual Warehouse configurations
183184 ansible.builtin.set_fact :
184185 run__dw_vw_configs : " {{ run__dw_vw_configs | default([]) | union([config]) }}"
185186 vars :
195196 loop_control :
196197 loop_var : __dw_config
197198 index_var : __dw_dbc_index
198- label : " {{ config.name }}"
199+ label : " {{ config.name }}"
200+
201+ - name : Check CDP DW Virtual Warehouse tags
202+ ansible.builtin.assert :
203+ that :
204+ - __dw_vw_config.tags | dict2items | rejectattr('value', 'regex', '[^-_a-zA-Z0-9.=:+@]+') | list
205+ fail_msg :
206+ - " A tag in Data Warehouse, '{{ __dw_vw_config.name }}', does not meet requirements;"
207+ - " current tags: {{ __dw_vw_config.tags}}."
208+ - " Allowed characters in tags are letters, numbers and the following characters: _.:/=+-@"
209+ quiet : yes
210+ loop_control :
211+ loop_var : __dw_vw_config
212+ label : " {{ __dw_vw_config.name }}"
213+ loop : " {{ run__dw_vw_configs }}"
0 commit comments