diff --git a/defaults/main.yml b/defaults/main.yml deleted file mode 100644 index fa0724e..0000000 --- a/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -zint_version: '2.11.0' -zint_source: "https://sourceforge.net/projects/zint/files/zint/{{ zint_version }}/zint-{{ zint_version }}-src.tar.gz/download" -zint_source_checksum: 'sha1:afca4c33ce82ec6027430a30bb58661157c0b38d' diff --git a/meta/main.yml b/meta/main.yml index d40fc40..cea4e30 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -9,6 +9,8 @@ galaxy_info: - name: Ubuntu versions: - focal + - jammy + - noble namespace: acromedia role_name: zint galaxy_tags: [] diff --git a/tasks/main.yml b/tasks/main.yml index eee993f..76798f4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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//zint--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"