diff --git a/roles/overcloud-prep-config/templates/overcloud-custom-tht-script.sh.j2 b/roles/overcloud-prep-config/templates/overcloud-custom-tht-script.sh.j2 index 7a0189020..437b9e5b7 100644 --- a/roles/overcloud-prep-config/templates/overcloud-custom-tht-script.sh.j2 +++ b/roles/overcloud-prep-config/templates/overcloud-custom-tht-script.sh.j2 @@ -28,6 +28,18 @@ pushd {{overcloud_templates_path}} git fetch {{ overcloud_templates_repo }} {{ overcloud_templates_refspec }} && git checkout FETCH_HEAD popd {% endif %} + +{% if deploy_composable_scenario|bool %} +## * If desired composable scenario isn't present in the checked-out +## code, but is present in RPM, copy the scenario from RPM location. +## :: +if [ ! -e "{{ overcloud_templates_path }}/ci/environments/{{ composable_scenario }}" \ + -a -e "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ composable_scenario }}" ]; then + cp "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ composable_scenario }}" \ + "{{ overcloud_templates_path }}/ci/environments/{{ composable_scenario }}" +fi +{% endif %} + {% endif %} {% if download_overcloud_templates_rpm is defined and overcloud_templates_path is defined %} diff --git a/roles/overcloud-upgrade/tasks/create-scripts.yml b/roles/overcloud-upgrade/tasks/create-scripts.yml index 6c13ccdf0..c12dd6061 100644 --- a/roles/overcloud-upgrade/tasks/create-scripts.yml +++ b/roles/overcloud-upgrade/tasks/create-scripts.yml @@ -14,7 +14,7 @@ # Need to set fact here because tht_dir is used in the templated script # in "Create major overcloud upgrade script" task - name: set fact for tht_dir - when: target_upgrade_version in ['ocata', 'master'] + when: target_upgrade_version in ['ocata'] set_fact: tht_dir: "/usr/share/openstack-tripleo-heat-templates"