diff options
author | Rihab Banday <rihab.banday@ericsson.com> | 2020-10-06 09:45:11 +0200 |
---|---|---|
committer | Rihab Banday <rihab.banday@ericsson.com> | 2020-11-13 09:39:44 +0000 |
commit | e34b4d93d5e288bdbb5ec798602ea5e8f1bc3985 (patch) | |
tree | 474d7df25ebe3226001fe9118b40dfb2df7e2388 /functions.sh | |
parent | 41dc0ffba7c09220626c8397589871063495c0f2 (diff) |
Switch to older settings for ansible playbooks and
VM creation steps
This change introduces two (older) settings needed for
CentOS 7 which were removed by recent patches that were
tested only on Ubuntu 16.04. These settings have been
already tested on Ubtunu 16.04.
Change-Id: I3039d650b59869d45e11afdda8827c850f686195
Signed-off-by: Rihab Banday <rihab.banday@ericsson.com>
Co-Authored-By: Victor Morales <v.morales@samsung.com>
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/71233
Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org>
Reviewed-by: Georg Kunz <georg.kunz@ericsson.com>
Diffstat (limited to 'functions.sh')
-rwxr-xr-x | functions.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh index fd19c46..20c4d5d 100755 --- a/functions.sh +++ b/functions.sh @@ -178,3 +178,14 @@ sudo docker run --rm \ ansible-playbook -i /bmra/inventory.ini /bmra/playbooks/cluster.yml EOF } + +# Executes a specific Ansible playbook +run_playbook() { + ansible_cmd="$(command -v ansible-playbook)" + ansible_cmd+=" -i $CURRENTPATH/inventory/localhost.ini" + ansible_cmd+=" -e ansible_python_interpreter=$(command -v python)" + if [ "${DEBUG:-false}" == "true" ]; then + ansible_cmd+=" -vvv" + fi + eval "$ansible_cmd $CURRENTPATH/playbooks/${1}.yaml" +} |