6 # -o pipefail: Fail on errors in scripts this calls, give stacktrace
9 # Install required packages
11 # shellcheck disable=SC1091
12 source deb_build/bin/activate
13 PYTHON="deb_build/bin/python"
14 $PYTHON -m pip install --upgrade pip
16 # Wait for any background apt processes to finish
17 # There seems to be a backgroud apt process that locks /var/lib/dpkg/lock
18 # and causes our apt commands to fail.
19 while pgrep apt > /dev/null; do sleep 1; done
22 sudo apt-add-repository ppa:ansible/ansible
24 sudo apt-get install -y ansible
26 # Install local version of ansible-opendaylight to path expected by Ansible.
27 # Could almost do this by setting ANSIBLE_ROLES_PATH=$WORKSPACE, but Ansible
28 # expects the dir containing the role to have the name of role. The JJB project
29 # is called "ansible", which causes the cloned repo name to not match the role
30 # name "opendaylight". So we need a cp/mv either way and this is simplest.
31 sudo cp -R "$WORKSPACE"/packaging-ansible /etc/ansible/roles/opendaylight