diff options
author | 2020-10-06 09:45:11 +0200 | |
---|---|---|
committer | 2020-11-13 09:39:44 +0000 | |
commit | e34b4d93d5e288bdbb5ec798602ea5e8f1bc3985 (patch) | |
tree | 474d7df25ebe3226001fe9118b40dfb2df7e2388 | |
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>
-rwxr-xr-x | deploy.sh | 9 | ||||
-rwxr-xr-x | functions.sh | 11 | ||||
-rw-r--r-- | playbooks/roles/jump-vm/tasks/main.yaml | 2 |
3 files changed, 15 insertions, 7 deletions
@@ -33,20 +33,17 @@ source "$CURRENTPATH/deploy.env" # --------------------------------------------------------------------- # bootstrap install prerequisites # --------------------------------------------------------------------- -ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \ - "$CURRENTPATH"/playbooks/bootstrap.yaml +run_playbook bootstrap # --------------------------------------------------------------------- # Create jump VM from which the installation is performed # --------------------------------------------------------------------- -ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \ - "$CURRENTPATH"/playbooks/jump-vm.yaml +run_playbook jump-vm # --------------------------------------------------------------------- # Create BMRA config based on IDF and PDF # --------------------------------------------------------------------- -ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \ - "$CURRENTPATH"/playbooks/bmra-config.yaml +run_playbook bmra-config # --------------------------------------------------------------------- # Copy files needed by Infra engine & BMRA in the jumphost VM 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" +} diff --git a/playbooks/roles/jump-vm/tasks/main.yaml b/playbooks/roles/jump-vm/tasks/main.yaml index f5f6154..2c0cc37 100644 --- a/playbooks/roles/jump-vm/tasks/main.yaml +++ b/playbooks/roles/jump-vm/tasks/main.yaml @@ -85,7 +85,7 @@ --disk path={{ workspace }}/kuberef-jump.qcow2,format=qcow2 \ --disk {{ workspace }}/kuberef-jump-cidata.iso,device=cdrom \ --network network=default,model=virtio,mac='{{ jumphost.interfaces[engine.net_config[engine.public_network].interface].mac_address }}' \ - --network bridge=pxebr,model=virtio,mac='{{ jumphost.interfaces[engine.net_config[engine.pxe_network].interface].mac_address }}' \ + --network bridge=pxebr,model=rtl8139,mac='{{ jumphost.interfaces[engine.net_config[engine.pxe_network].interface].mac_address }}' \ --import --noautoconsole" - name: start jump VM |