diff --git a/tasks/collect_config/commit/git.yml b/tasks/collect_config/commit/git.yml index 2c52978b3298695113090842bd7ca8e355cc044e..dc2497de859fbc8e12da6a060279643b974bb812 100644 --- a/tasks/collect_config/commit/git.yml +++ b/tasks/collect_config/commit/git.yml @@ -23,7 +23,7 @@ - config user.name "Auto Config Export" - commit -am "Config change on server" - when: git_status.stdout != '' + when: '"nothing to commit, working tree clean" not in git_status.stdout' tags: - deploy diff --git a/tasks/collect_config/commit/gitextra.yml b/tasks/collect_config/commit/gitextra.yml index 2c5d2e305bf2d4c07f74da48a24edb33cb460c4d..8cf61f035f65da4e7cdd7f8a385f6f76fc5bd944 100644 --- a/tasks/collect_config/commit/gitextra.yml +++ b/tasks/collect_config/commit/gitextra.yml @@ -23,7 +23,7 @@ - config user.name "Auto Config Export" - commit -am "Config change on server" - when: git_status.stdout != '' + when: '"nothing to commit, working tree clean" not in git_status.stdout' tags: - deploy diff --git a/tasks/collect_config/finish/git.yml b/tasks/collect_config/finish/git.yml index 84bebb317330771e6cdec6154a5d4297b5dfae61..7cce0844744887e4831f4bd19bd88bb06a59a534 100644 --- a/tasks/collect_config/finish/git.yml +++ b/tasks/collect_config/finish/git.yml @@ -8,7 +8,7 @@ args: chdir: '{{ webRoot }}' become: no - when: git_status.stdout != '' + when: '"nothing to commit, working tree clean" not in git_status.stdout' - name: Delete webroot working copy file: diff --git a/tasks/collect_config/finish/gitextra.yml b/tasks/collect_config/finish/gitextra.yml index e5b169cb2fb74fb23a1edd5235b58193b68072ec..d55bd335ee978096f1b12e55e41a07e5019ef478 100644 --- a/tasks/collect_config/finish/gitextra.yml +++ b/tasks/collect_config/finish/gitextra.yml @@ -8,7 +8,7 @@ args: chdir: '{{ webRoot }}/{{ collect_config_key }}' become: no - when: git_status.stdout != '' + when: '"nothing to commit, working tree clean" not in git_status.stdout' - name: Delete webroot working copy file: diff --git a/tasks/collect_config/finish/gitflow.yml b/tasks/collect_config/finish/gitflow.yml index 57011ef20a28a0aa2c0a9c072a866c8a9ec320c2..17775aad3e0d7315418acc96f4f616d71209797a 100644 --- a/tasks/collect_config/finish/gitflow.yml +++ b/tasks/collect_config/finish/gitflow.yml @@ -16,7 +16,7 @@ - push -o ci.skip - commit --allow-empty -m "Trigger deployment to develop" - push - when: git_status.stdout != '' + when: '"nothing to commit, working tree clean" not in git_status.stdout' - name: Delete webroot working copy file: diff --git a/tasks/collect_config/finish/gitlabflow.yml b/tasks/collect_config/finish/gitlabflow.yml index 0c1a6d8372e84c35496bcc82cb7f5a3350a8d8b1..e5c94206636cb08540988d82c85784fc53a2bb32 100644 --- a/tasks/collect_config/finish/gitlabflow.yml +++ b/tasks/collect_config/finish/gitlabflow.yml @@ -12,7 +12,7 @@ - checkout develop - merge cc-{{ version }} - push -o ci.skip - when: git_status.stdout != '' + when: '"nothing to commit, working tree clean" not in git_status.stdout' - name: Delete webroot working copy file: