Merge "Use the environment model template from Mirantis/environment-template"
diff --git a/tcp_tests/templates/shared-salt.yaml b/tcp_tests/templates/shared-salt.yaml
index 2927e21..cb1c515 100644
--- a/tcp_tests/templates/shared-salt.yaml
+++ b/tcp_tests/templates/shared-salt.yaml
@@ -465,9 +465,10 @@
- description: Replace needed formulas to desired version
cmd: |
set -e;
- {%- for formula in SALT_FORMULAS_REFS.split(' ') %}
- {% set formula_name = formula.0 %}
- {% set formula_ref = formula.1 %}
+ {%- for formula_set in SALT_FORMULAS_REFS.split(' ') %}
+ {% set formula = formula_set.split(':') %}
+ {% set formula_name = formula[0] %}
+ {% set formula_ref = formula[1] %}
{% set formula_dir = '/tmp/salt-formula-' + formula_name %}
git clone {{ SALT_FORMULAS_REPO }}/{{ formula_name }} {{ formula_dir }} &&
pushd {{ formula_dir }} &&
@@ -477,8 +478,8 @@
if [ -d "{{ formula_dir }}" ]; then
echo "Going to replace packaged formula {{ formula_name }}" &&
rm -rfv /usr/share/salt-formulas/{env,reclass/service}/{{ formula_name }} &&
- ln -v -s \"{{ formula_dir }}/{{ formula_name }}\" \"/usr/share/salt-formulas/env/{{ formula_name }}\" &&
- ln -v -s \"{{ formula_dir }}/metadata/service/\" \"/usr/share/salt-formulas/reclass/service/{{ formula_name }}\";
+ ln -v -s "{{ formula_dir }}/{{ formula_name }}" "/usr/share/salt-formulas/env/{{ formula_name }}" &&
+ ln -v -s "{{ formula_dir }}/metadata/service/" "/usr/share/salt-formulas/reclass/service/{{ formula_name }}";
else
echo "Stopped, directory /root/salt-formula-{{ formula_name }} does not exist!";
fi