From f38516a32f73766b965c975a86559bfc629da7a9 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 28 Oct 2015 10:42:50 -0400 Subject: [PATCH] reset the branch before making changes Signed-off-by: Alfredo Deza --- ansible/roles/ceph-release/tasks/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/roles/ceph-release/tasks/main.yml b/ansible/roles/ceph-release/tasks/main.yml index 53c81458..990c3d79 100644 --- a/ansible/roles/ceph-release/tasks/main.yml +++ b/ansible/roles/ceph-release/tasks/main.yml @@ -17,6 +17,12 @@ # because if the repo exists then it probably has the origin already in there ignore_errors: yes +- name: reset --hard to upstream + command: git fetch + command: git reset --hard /{{ branch }} + ignore_errors: yes + when: clean + - name: clear the previous local tag command: git tag -d v{{ version }} chdir=ceph ignore_errors: yes @@ -27,12 +33,6 @@ ignore_errors: yes when: clean -- name: reset --hard to upstream - command: git fetch - command: git reset --hard /{{ branch }} - ignore_errors: yes - when: clean - - name: force git checkout {{ branch }} branch command: git checkout -f {{ branch }} chdir=ceph -- 2.39.5