From e9aa23f816f5ce9208b547fb7ae882905cbbe5a2 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 16 Aug 2023 20:37:19 +0200 Subject: my_workspace: use community.general.make --- roles/my_workspace/tasks/project.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'roles') 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 -- cgit v1.2.3