documenting archive, adding zig helper

This commit is contained in:
2026-03-20 17:51:22 -06:00
parent 2d65e01f7b
commit 4a638d9dcc
3 changed files with 50 additions and 2 deletions

View File

@@ -1,4 +1,11 @@
# vim: set filetype=yaml.ansible :
#
## Helpers: archive.yml
## Description: extract and symlink archives
## Variables: dict of key:value pairs
## extract_to: path to extract archive to
## name: filename of the archive
## url: download url of the archive
---
- name: Ensure requirements met
when:

27
tasks/helpers/zig.yml Normal file
View File

@@ -0,0 +1,27 @@
# vim : set filetype=yaml.ansible :
#
## Helper: zig.yml
## Description: build and install zig based packages
## Variables: dict of key:value pairs
## source_path: Destination path when cloning/extracting
## git: passed into helpers/git.yml if present. See that for required dict keys
## archive: passed into helpers/archive.yml to extract if present. See that for required dict keys
## prefix: install prefix
## flags: flags to pass to zig build
---
- name: Clone git repository if it exists
when:
- pkg.git is defined
vars:
path: "{{ pkg.source_path }}"
repo: "{{ pkg.git.repo }}"
depth: "{{ pkg.git.depth | default(omit) }}"
force: "{{ pkg.git.force | default(omit) }}"
recursive: "{{ pkg.git.recursive | default(omit) }}"
version: "{{ pkg.version | default(omit) }}"
ansible.builtin.include_tasks: helpers/git.yml
- name: Download and extract source archive
when:
- pkg.archive is defined
ansible.bulitin.include_tasks: helpers/archive.yml