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