add helpers for git cloning and building

This commit is contained in:
Matthew Stobbs
2025-03-31 19:44:02 -06:00
parent dc120c0fec
commit 6593947256
5 changed files with 68 additions and 50 deletions

View File

@@ -0,0 +1,19 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure {{ repo.git_path }}
ansible.builtin.command:
creates: "{{ repo.git_path }}/build"
chdir: "{{ repo.git_path }}"
argv: "{{ repo.build.configure }}"
- name: Build {{ repo.git_path }}
ansible.builtin.command:
creates: "{{ repo.git_path }}/{{ repo.build.creates }}"
chdir: "{{ repo.git_path }}"
argv: "{{ repo.build.build }}"
- name: Install {{ repo.git_push }}
ansible.buitlin.command:
creates: "{{ repo.prefix }}/{{ repo.build.installs }}"
chdir: "{{ repo.git_path }}"
argv: "{{ repo.build.install }}"

7
tasks/helpers/git.yml Normal file
View File

@@ -0,0 +1,7 @@
- name: Clone git repository {{ repo.repo }}
ansible.builtin.git:
depth: 1
force: true
dest: "{{ repo.git_path }}"
repo: "{{ repo.repo }}"
version: "{{ repo.version | default(omit) }}"