From 086f85aab1edd036064f232796712ea559742d36 Mon Sep 17 00:00:00 2001 From: aminnairi <18418459+aminnairi@users.noreply.github.com> Date: Sat, 30 Nov 2024 18:52:31 +0100 Subject: [PATCH] now only copying & removing the binary if the binary has been compiled previously --- ansible/roles/markdown-table-align/tasks/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible/roles/markdown-table-align/tasks/main.yml b/ansible/roles/markdown-table-align/tasks/main.yml index 2906a49..ea1e9dd 100644 --- a/ansible/roles/markdown-table-align/tasks/main.yml +++ b/ansible/roles/markdown-table-align/tasks/main.yml @@ -15,15 +15,16 @@ chdir: /$HOME/Documents/git/github.com/aminnairi/markdown-table-align cmd: deno compile index.ts when: git_clone_result.changed + register: compile_the_binary - name: Copy the binary ansible.builtin.copy: src: /$HOME/Documents/git/github.com/aminnairi/markdown-table-align/markdown-table-align dest: /$HOME/.local/bin - when: git_clone_result.changed + when: compile_the_binary.changed - name: Remove the binary ansible.builtin.file: path: /$HOME/Document/git/github.com/aminnairi/markdown-table-align/markdown-table-align state: absent - when: git_clone_result.changed + when: compile_the_binary.changed