Add ARA callback and reporting
This adds the ARA [1] callback in order to record the playbook executions and generate a report that will be retrieved as part of the logs at the end of the jobs. [1]: https://github.com/openstack/ara Change-Id: I101f74223b5277b34825ba0e46b3365a544c5435
This commit is contained in:
parent
51bba13a71
commit
47ef35d167
|
@ -469,7 +469,7 @@ sudo -H pip install virtualenv
|
||||||
virtualenv /tmp/ansible
|
virtualenv /tmp/ansible
|
||||||
# NOTE(emilien): workaround to avoid installing cryptography
|
# NOTE(emilien): workaround to avoid installing cryptography
|
||||||
# https://github.com/ansible/ansible/issues/15665
|
# https://github.com/ansible/ansible/issues/15665
|
||||||
/tmp/ansible/bin/pip install paramiko==1.16.0 ansible==$ANSIBLE_VERSION
|
/tmp/ansible/bin/pip install paramiko==1.16.0 ansible==$ANSIBLE_VERSION ara
|
||||||
export ANSIBLE=/tmp/ansible/bin/ansible
|
export ANSIBLE=/tmp/ansible/bin/ansible
|
||||||
export ANSIBLE_PLAYBOOK=/tmp/ansible/bin/ansible-playbook
|
export ANSIBLE_PLAYBOOK=/tmp/ansible/bin/ansible-playbook
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ done
|
||||||
# Write ansible config file
|
# Write ansible config file
|
||||||
cat > "$WORKSPACE/ansible.cfg" <<EOF
|
cat > "$WORKSPACE/ansible.cfg" <<EOF
|
||||||
[defaults]
|
[defaults]
|
||||||
callback_plugins = $WORKSPACE/devstack-gate/playbooks/plugins/callback
|
callback_plugins = $WORKSPACE/devstack-gate/playbooks/plugins/callback:/tmp/ansible/lib/python2.7/site-packages/ara/plugins/callbacks
|
||||||
stdout_callback = devstack
|
stdout_callback = devstack
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -641,4 +641,7 @@ $ANSIBLE subnodes -f 5 -i "$WORKSPACE/inventory" -m synchronize \
|
||||||
-a "mode=pull src='$BASE/logs/' dest='$BASE/logs/subnode-{{ host_counter }}' copy_links=yes"
|
-a "mode=pull src='$BASE/logs/' dest='$BASE/logs/subnode-{{ host_counter }}' copy_links=yes"
|
||||||
sudo mv $WORKSPACE/devstack-gate-cleanup-host.txt $BASE/logs/
|
sudo mv $WORKSPACE/devstack-gate-cleanup-host.txt $BASE/logs/
|
||||||
|
|
||||||
|
# Generate ARA report
|
||||||
|
/tmp/ansible/bin/ara generate $BASE/logs/ara
|
||||||
|
|
||||||
exit $RETVAL
|
exit $RETVAL
|
||||||
|
|
Loading…
Reference in New Issue