3 # Uninstall any previous installation
4 sudo yum remove opendaylight -y
6 # Delete the ODL directory to ensure a clean working enviroment
7 sudo rm -rf /opt/opendaylight
9 # Install OpenDaylight with custom config via repo using example Ansible playbook
10 sudo ansible-playbook -i "localhost," -c local $WORKSPACE/packaging-ansible/examples/rpm_10_devel_odl_api.yml
12 # Create Ansible custom module directories
13 sudo mkdir -p /usr/share/ansible/plugins/modules
15 # Copy the custom module to the directory above
16 sudo cp $WORKSPACE/packaging-ansible/library/odl_usermod.py /usr/share/ansible/plugins/modules/
18 # Execute the odl-user-test playbook
19 sudo ansible-playbook -i "localhost," -c local $WORKSPACE/packaging-ansible/tests/test-odl-users.yaml -v
21 # Test the custom log configurations
22 sudo ansible-playbook -i "localhost," -c local $WORKSPACE/packaging-ansible/tests/test-odl-logs.yaml -e test_log_level=INFO -e test_log_mechanism=file -v