File tree Expand file tree Collapse file tree 6 files changed +19
-14
lines changed
Expand file tree Collapse file tree 6 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 33
44{% for item in new_template_data %}
55# Image for {{ item.key }}
6- {{ item.value.name }}:
6+ {{ item.value.name | replace('-', '_') | replace('.', '_') }}:
77 name: "{{ item.value.name }}"
88 type: qcow2
99 image_url: "{{ item.value.url }}"
1818kubernetes_images:
1919{% if matching_images is defined and matching_temps | length > 0 %}
2020{% for item in matching_images %}
21- {% if item .value .name not in new_template_data | map (attribute ='value.name' ) %}
21+ {% if ( item .value .name | replace ( '_' , '-' )) not in ( new_template_data | map (attribute ='value.name' ) ) %}
2222 - "{{ '{{ ' + item.key + ' }}' }}"
2323{% endif %}
2424{% endfor %}
2525{% endif %}
2626{% for item in new_template_data %}
27- - "{{ '{{ ' + item.value.name + ' }}' }}"
28- {% endfor %}
27+ - "{{ '{{ ' + ( item.value.name | replace('-', '_')) | replace('.', '_') + ' }}' }}"
28+ {% endfor %}
Original file line number Diff line number Diff line change 33# Old magnum images - hide until out of use
44
55{% for item in matching_images %}
6- {% if item .value .name not in new_template_data | map (attribute ='value.name' ) %}
6+ {% if item .value .name not in new_template_data | map (attribute ='value.name' ) | replace ( '-' , '_' ) %}
77{{ item.key }}:
88{% for key , value in item .value .items () %}
99{% if value is mapping %}
1818
1919{% endif %}
2020{% endfor %}
21- {% endif %}
21+ {% endif %}
Original file line number Diff line number Diff line change 33# Old magnum templates - hide until out of use
44
55{% for item in matching_temps %}
6- {% if item .key not in new_template_data | map (attribute ='key' ) %}
6+ {% if item .key not in new_template_data | map (attribute ='key' ) | replace ( '-' , '_' ) %}
77{{ item.key }}:
88{% for key , value in item .value .items () %}
99{% if key == 'is_hidden' %}
@@ -23,4 +23,4 @@ is_hidden: True
2323
2424{% endif %}
2525{% endfor %}
26- {% endif %}
26+ {% endif %}
Original file line number Diff line number Diff line change 22# Configuration of Magnum container clusters.
33
44{% for item in new_template_data %}
5- {{ item.key }}:
5+ {{ item.key | replace('-', '_') }}:
66 labels:
77 monitoring_enabled: "true"
88 kube_dashboard_enabled: "true"
2626openstack_container_clusters_templates:
2727{% if matching_temps is defined and matching_temps | length > 0 %}
2828{% for item in matching_temps %}
29- {% if item .key not in new_template_data | map (attribute ='key' ) %}
29+ {% if ( item .key | replace ( '_' , '-' )) not in ( new_template_data | map (attribute ='key' ) ) %}
3030 - "{{ '{{ ' + item.key + ' }}' }}"
3131{% endif %}
3232{% endfor %}
3333{% endif %}
3434{% for item in new_template_data %}
35- - "{{ '{{ ' + item.key + ' }}' }}"
36- {% endfor %}
35+ - "{{ '{{ ' + ( item.key| replace('-', '_')) + ' }}' }}"
36+ {% endfor %}
Original file line number Diff line number Diff line change @@ -13,10 +13,15 @@ if [ -f "$CONFIG_ROOT/tools/merge_config/clouds.yaml" ]; then
1313fi
1414
1515# If a Python virtualenv exists, activate it
16+ if [[ "$VIRTUAL_ENV" != "" ]]; then
17+ VENV=$VIRTUAL_ENV
18+ fi
19+
1620VENV="${VENV:-"$CONFIG_ROOT/tools/merge_config/.venv"}"
21+
1722if [ -f "$VENV/bin/activate" ]; then
1823 echo "Activating Python venv at $VENV"
1924 source "$VENV/bin/activate"
2025fi
2126
22- echo "Activated environment"
27+ echo "Activated environment"
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ source $CONFIG_ROOT/tools/merge_config/bin/activate
66
77export ANSIBLE_CONFIG=$CONFIG_ROOT /tools/merge_config/ansible.cfg
88
9- ansible-playbook $CONFIG_ROOT /tools/merge_config/merge_templates.yml
9+ ansible-playbook $CONFIG_ROOT /tools/merge_config/merge_templates.yml
You can’t perform that action at this time.
0 commit comments