aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/my_workspace
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--roles/my_workspace/defaults/main.yml2
-rw-r--r--roles/my_workspace/tasks/project.yml53
2 files changed, 30 insertions, 25 deletions
diff --git a/roles/my_workspace/defaults/main.yml b/roles/my_workspace/defaults/main.yml
index 2eb04de..2c861e4 100644
--- a/roles/my_workspace/defaults/main.yml
+++ b/roles/my_workspace/defaults/main.yml
@@ -3,3 +3,5 @@
my_workspace_dir: /srv/workspace
my_workspace_projects: []
+
+my_workspace_clone_only: false
diff --git a/roles/my_workspace/tasks/project.yml b/roles/my_workspace/tasks/project.yml
index 790ab74..260950a 100644
--- a/roles/my_workspace/tasks/project.yml
+++ b/roles/my_workspace/tasks/project.yml
@@ -22,31 +22,34 @@
- name: user.email
value: '{{ my_workspace_git_email }}'
- - name: Check for Makefile
- ansible.builtin.file:
- path: '{{ project_dir }}/Makefile'
- state: file
- register: makefile_check
- ignore_errors: true
+ - name: Set the project running
+ when: not my_workspace_clone_only
+ block:
+ - name: Check for Makefile
+ ansible.builtin.file:
+ path: '{{ project_dir }}/Makefile'
+ state: file
+ register: makefile_check
+ ignore_errors: true
- - name: Check for docker-compose.yml
- ansible.builtin.file:
- path: '{{ project_dir }}/docker-compose.yml'
- state: file
- register: docker_compose_check
- ignore_errors: true
+ - name: Check for docker-compose.yml
+ ansible.builtin.file:
+ path: '{{ project_dir }}/docker-compose.yml'
+ state: file
+ register: docker_compose_check
+ ignore_errors: true
- - name: Run make
- become: true
- community.general.make:
- chdir: '{{ project_dir }}'
- when: makefile_check is succeeded
+ - name: Run make
+ become: true
+ community.general.make:
+ chdir: '{{ project_dir }}'
+ when: makefile_check is succeeded
- - name: Run docker-compose
- become: true
- community.docker.docker_compose_v2:
- project_src: '{{ project_dir }}'
- pull: always
- build: always
- remove_orphans: true
- when: makefile_check is not succeeded and docker_compose_check is succeeded
+ - name: Run docker-compose
+ become: true
+ community.docker.docker_compose_v2:
+ project_src: '{{ project_dir }}'
+ pull: always
+ build: always
+ remove_orphans: true
+ when: makefile_check is not succeeded and docker_compose_check is succeeded