From 56ae78b9ea95f1ad541ff507a3eba46b02a5ec65 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Fri, 13 Nov 2015 15:12:24 -0700 Subject: [PATCH] ceph-build-pull-requests: check ansible syntax With this change, the ceph-build-pull-requests job will run ansible-playbook with the "--syntax-check" flag on every playbook in the top-level of "./ansible/". This will help us avoid simple Ansible syntax errors. --- ceph-build-pull-requests/build/build | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ceph-build-pull-requests/build/build b/ceph-build-pull-requests/build/build index 63d69453c..cc21e1002 100644 --- a/ceph-build-pull-requests/build/build +++ b/ceph-build-pull-requests/build/build @@ -29,3 +29,14 @@ for dir in `find . -maxdepth 1 -path ./.git -prune -o -type d -print`; do venv/bin/jenkins-jobs test $definitions_dir -o /tmp/output fi done + +# Install Ansible +if ! venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index ansible; then + venv/bin/pip install --download-directory="$PIP_SDIST_INDEX" ansible + venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index ansible +fi + +# Syntax-check each Ansible playbook +for playbook in $WORKSPACE/ansible/*.yml; do + ansible-playbook -i '127.0.0.1,' $playbook --syntax-check +done -- 2.47.3