]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Use flock to avoid race conditions with git 269/head
authorZack Cerza <zack@redhat.com>
Wed, 20 Jul 2016 22:29:39 +0000 (16:29 -0600)
committerZack Cerza <zack@redhat.com>
Wed, 20 Jul 2016 22:29:39 +0000 (16:29 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh

index 3889bcf929e8e6d68d913da8cef80935bf888bdd..23bd33d225254052d86601344a871ac6281f4438 100644 (file)
@@ -19,11 +19,11 @@ if [ $SECRETS_REPO_NAME != 'UNDEFINED' ]
 then
     ANSIBLE_SECRETS_PATH=/root/$SECRETS_REPO_NAME
     pushd $ANSIBLE_SECRETS_PATH
-    git pull
+    flock --close ./.lock git pull
     popd
 fi
 pushd $ANSIBLE_CM_PATH
-git pull
+flock --close ./.lock git pull
 export ANSIBLE_SSH_PIPELINING=1
 export ANSIBLE_HOST_KEY_CHECKING=False
 # Tell ansible to create users and populate authorized_keys