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 3
3
4
4
{% for item in new_template_data %}
5
5
# Image for {{ item.key }}
6
- {{ item.value.name }}:
6
+ {{ item.value.name | replace('-', '_') | replace('.', '_') }}:
7
7
name: "{{ item.value.name }}"
8
8
type: qcow2
9
9
image_url: "{{ item.value.url }}"
18
18
kubernetes_images:
19
19
{% if matching_images is defined and matching_temps | length > 0 %}
20
20
{% 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' ) ) %}
22
22
- "{{ '{{ ' + item.key + ' }}' }}"
23
23
{% endif %}
24
24
{% endfor %}
25
25
{% endif %}
26
26
{% 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 3
3
# Old magnum images - hide until out of use
4
4
5
5
{% 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 ( '-' , '_' ) %}
7
7
{{ item.key }}:
8
8
{% for key , value in item .value .items () %}
9
9
{% if value is mapping %}
18
18
19
19
{% endif %}
20
20
{% endfor %}
21
- {% endif %}
21
+ {% endif %}
Original file line number Diff line number Diff line change 3
3
# Old magnum templates - hide until out of use
4
4
5
5
{% 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 ( '-' , '_' ) %}
7
7
{{ item.key }}:
8
8
{% for key , value in item .value .items () %}
9
9
{% if key == 'is_hidden' %}
@@ -23,4 +23,4 @@ is_hidden: True
23
23
24
24
{% endif %}
25
25
{% endfor %}
26
- {% endif %}
26
+ {% endif %}
Original file line number Diff line number Diff line change 2
2
# Configuration of Magnum container clusters.
3
3
4
4
{% for item in new_template_data %}
5
- {{ item.key }}:
5
+ {{ item.key | replace('-', '_') }}:
6
6
labels:
7
7
monitoring_enabled: "true"
8
8
kube_dashboard_enabled: "true"
26
26
openstack_container_clusters_templates:
27
27
{% if matching_temps is defined and matching_temps | length > 0 %}
28
28
{% 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' ) ) %}
30
30
- "{{ '{{ ' + item.key + ' }}' }}"
31
31
{% endif %}
32
32
{% endfor %}
33
33
{% endif %}
34
34
{% 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
13
13
fi
14
14
15
15
# If a Python virtualenv exists, activate it
16
+ if [[ "$VIRTUAL_ENV" != "" ]]; then
17
+ VENV=$VIRTUAL_ENV
18
+ fi
19
+
16
20
VENV="${VENV:-"$CONFIG_ROOT/tools/merge_config/.venv"}"
21
+
17
22
if [ -f "$VENV/bin/activate" ]; then
18
23
echo "Activating Python venv at $VENV"
19
24
source "$VENV/bin/activate"
20
25
fi
21
26
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
6
6
7
7
export ANSIBLE_CONFIG=$CONFIG_ROOT /tools/merge_config/ansible.cfg
8
8
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