diff options
-rw-r--r-- | roles/my_workspace/tasks/project.yml | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/roles/my_workspace/tasks/project.yml b/roles/my_workspace/tasks/project.yml index f9a138a..41fed86 100644 --- a/roles/my_workspace/tasks/project.yml +++ b/roles/my_workspace/tasks/project.yml @@ -23,21 +23,6 @@ register: makefile_check ignore_errors: true -- name: This project uses make - become: true - when: makefile_check is succeeded - block: - - name: Run make - ansible.builtin.command: make - args: - chdir: '{{ project_dir }}' - register: make_output - when: makefile_check is succeeded - - - name: Show make output - ansible.builtin.debug: - var: make_output - - name: Check for docker-compose.yml ansible.builtin.file: path: '{{ project_dir }}/docker-compose.yml' @@ -45,6 +30,12 @@ register: docker_compose_check ignore_errors: true +- name: Run make + become: true + community.general.make: + chdir: '{{ project_dir }}' + when: makefile_check is succeeded + - name: This project uses docker-compose become: true when: makefile_check is not succeeded and docker_compose_check is succeeded |