44 path : " {{ install.custom.hostnames }}"
55 register : custom_hostname_files
66 delegate_to : localhost
7+ when : install.custom.hostnames.split('/')[-1]|length <= 255
78
8- - name : validate custom hostnames
9- fail :
10- msg : " {{ item }} is not valid value for --custom-hostnames "
11- when :
12- - not item.split('=')[1]|default(False)
13- - not custom_hostname_files.stat.exists
14- with_items : " {{ install.custom.hostnames.split(',') }}"
9+ - block :
10+ - name : validate custom hostnames
11+ fail :
12+ msg : " {{ item }} is not valid value for --custom-hostnames "
13+ when :
14+ - not item.split('=')[1]|default(False)
15+ with_items : " {{ install.custom.hostnames.split(',') }}"
1516
16- - name : create custom_hostnames.yaml
17- template :
18- src : control_node_placement/custom_hostnames.yaml.j2
19- dest : " {{ template_base }}/custom_hostnames.yaml"
20- when : not custom_hostname_files.stat.exists
17+ - name : create custom_hostnames.yaml
18+ template :
19+ src : control_node_placement/custom_hostnames.yaml.j2
20+ dest : " {{ template_base }}/custom_hostnames.yaml"
21+
22+ when : install.custom.hostnames.split('/')[-1]|length > 255 or not custom_hostname_files.stat.exists
2123
2224- name : copy provided env file for custom hostnames
2325 copy :
2426 src : " {{ install.custom.hostnames }}"
2527 dest : " {{ template_base }}/custom_hostnames.yaml"
26- when : custom_hostname_files.stat.exists
28+ when :
29+ - install.custom.hostnames.split('/')[-1]|length <= 255
30+ - custom_hostname_files.stat.exists
0 commit comments