Skip to content

Commit

Permalink
fix: remove need for defaults, update ubuntu support list
Browse files Browse the repository at this point in the history
  • Loading branch information
jseniuk committed May 30, 2024
1 parent 2588f5b commit 088fbf3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
4 changes: 0 additions & 4 deletions defaults/main.yml

This file was deleted.

2 changes: 2 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ galaxy_info:
- name: Ubuntu
versions:
- focal
- jammy
- noble
namespace: acromedia
role_name: zint
galaxy_tags: []
Expand Down
19 changes: 19 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
- set_fact:
zint_local_source_base: /usr/local/src/zint

- name: Set zint version if not defined by sending a request to SourceForge
# https://sourceforge.net/projects/zint/best_release.json
uri:
url: "https://sourceforge.net/projects/zint/best_release.json"
return_content: yes
register: zint_version_result
when: zint_version is not defined

- set_fact:
# version can be grabbed from release.filename, which looks like /zint/<version>/zint-<version>-src.tar.gz
zint_version: "{{ zint_version_result.json.release.filename.split('/')[2] }}"
zint_source_checksum: "md5:{{ zint_version_result.json.release.md5sum }}"
when: zint_version is not defined

- name: Set source URL if not defined
set_fact:
zint_source: "https://sourceforge.net/projects/zint/files/zint/{{ zint_version }}/zint-{{ zint_version }}-src.tar.gz/download"
when: zint_source is not defined

- set_fact:
zint_local_source_gz: "{{ zint_local_source_base }}/zint-{{ zint_version }}.tar.gz"
zint_local_source_dir: "{{ zint_local_source_base }}/zint-{{ zint_version }}-src"
Expand Down

0 comments on commit 088fbf3

Please sign in to comment.