From a58780d86bfc09f000b2b5cca6306afb334b56de Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 19 Mar 2018 14:49:57 +0100 Subject: [PATCH] By default execute in repo dir Signed-off-by: Knut Ahlers --- tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 4d7c2a8..e5fc705 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,7 @@ - name: Execute pre-commands command: '{{ item.pre_command.command }}' args: - chdir: '{{ item.pre_command.chdir | default(omit) }}' + chdir: '{{ item.pre_command.chdir | default(item.dest) }}' with_items: '{{ git_checkouts }}' when: '{{ item.pre_command is defined }}' @@ -19,7 +19,7 @@ - name: Execute post-commands command: '{{ item.post_command.command }}' args: - chdir: '{{ item.post_command.chdir | default(omit) }}' + chdir: '{{ item.post_command.chdir | default(item.dest) }}' with_items: '{{ git_checkouts }}' when: '{{ item.post_command is defined }}'