Switch to older settings for ansible playbooks and 33/71233/3
authorRihab Banday <rihab.banday@ericsson.com>
Tue, 6 Oct 2020 07:45:11 +0000 (09:45 +0200)
committerRihab Banday <rihab.banday@ericsson.com>
Fri, 13 Nov 2020 09:39:44 +0000 (09:39 +0000)
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>
deploy.sh
functions.sh
playbooks/roles/jump-vm/tasks/main.yaml

index 5a012e7..b45825c 100755 (executable)
--- a/deploy.sh
+++ b/deploy.sh
@@ -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
index fd19c46..20c4d5d 100755 (executable)
@@ -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"
+}
index f5f6154..2c0cc37 100644 (file)
@@ -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