c44c08bb7249e483b6b8a1047e0022dac049fbe6
[releng/builder.git] / jjb / packaging / test-ansible-odl-user.sh
1 #!/bin/bash
2
3 # Options:
4 #   -x: Echo commands
5 #   -e: Fail on errors
6 #   -o pipefail: Fail on errors in scripts this calls, give stacktrace
7 set -ex -o pipefail
8
9 # Create Ansible custom module directories
10 sudo mkdir -p /usr/share/ansible/plugins/modules
11
12 # Copy the custom module to the directory above
13 sudo cp $WORKSPACE/ansible/library/odl_usermod.py /usr/share/ansible/plugins/modules/
14
15 # Execute the odl-user-test playbook
16 sudo ansible-playbook -i "localhost," -c local $WORKSPACE/ansible/tests/test-odl-users.yaml -v