Skip to content

Commit d7a3261

Browse files
committed
Use playbooks from collection for add-compute.sh
This simplifies logic and removes necessity to know openstack-ansible clone location Change-Id: I44b1234e20fde3b835a5194ab5f3ed60121b19cc Signed-off-by: Dmitriy Rabotyagov <dmitriy@adria-cloud.com>
1 parent a0dc770 commit d7a3261

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

scripts/add-compute.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
export OSA_REPO_PATH=${OSA_REPO_PATH:-"/opt/openstack-ansible"}
1817
export OSA_CONFIG_DIR=${OSA_CONFIG_DIR:-"/etc/openstack_deploy"}
1918
export HOSTS=${1:-""}
2019

@@ -37,10 +36,10 @@ function define_tasks {
3736
done
3837
fi
3938

40-
RUN_TASKS+=("${OSA_REPO_PATH}/playbooks/setup-hosts.yml --limit ${HOSTS}")
41-
RUN_TASKS+=("${OSA_REPO_PATH}/playbooks/openstack-hosts-setup.yml -e openstack_hosts_group=nova_compute --tags openstack_hosts-file")
42-
RUN_TASKS+=("${OSA_REPO_PATH}/playbooks/setup-openstack.yml --limit ${HOSTS}")
43-
RUN_TASKS+=("${OSA_REPO_PATH}/playbooks/unbound-install.yml --tags unbound-config")
39+
RUN_TASKS+=("openstack.osa.setup_hosts --limit ${HOSTS}")
40+
RUN_TASKS+=("openstack.osa.openstack_hosts_setup -e openstack_hosts_group=nova_compute --tags openstack_hosts-file")
41+
RUN_TASKS+=("openstack.osa.setup_openstack --limit ${HOSTS}")
42+
RUN_TASKS+=("openstack.osa.unbound --tags unbound-config")
4443

4544
if [[ ! -z ${POST_OSA_TASKS} ]]; then
4645
if [ "${BASH_VERSINFO[0]}" -ge 4 ] && [ "${BASH_VERSINFO[1]}" -ge 4 ]; then
@@ -82,9 +81,6 @@ function main {
8281
if [[ -z ${HOSTS} ]]; then
8382
echo "Hosts to setup are not provided"
8483
exit 1
85-
elif [[ ! -d ${OSA_REPO_PATH} ]]; then
86-
echo "OSA repo is not found: ${OSA_REPO_PATH}. Define OSA_REPO_PATH to set another directory"
87-
exit 1
8884
fi
8985

9086
define_tasks

0 commit comments

Comments
 (0)