aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-16 20:37:19 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-16 20:37:19 +0200
commite9aa23f816f5ce9208b547fb7ae882905cbbe5a2 (patch)
tree061040d87ae37cbd4577feceba42b30c797518de
parentmy_workspace: don't install vim by default (diff)
downloadinfra-ansible-e9aa23f816f5ce9208b547fb7ae882905cbbe5a2.tar.gz
infra-ansible-e9aa23f816f5ce9208b547fb7ae882905cbbe5a2.zip
my_workspace: use community.general.make
-rw-r--r--roles/my_workspace/tasks/project.yml21
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