From 088fbf34cb922bf210eb35d3486ec382654fb749 Mon Sep 17 00:00:00 2001 From: Jaden Seniuk Date: Thu, 30 May 2024 16:51:03 -0700 Subject: [PATCH 1/6] fix: remove need for defaults, update ubuntu support list --- defaults/main.yml | 4 ---- meta/main.yml | 2 ++ tasks/main.yml | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) delete mode 100644 defaults/main.yml 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" From f3a99f87989cfe8aa0648925edd3bfb370e07917 Mon Sep 17 00:00:00 2001 From: Jaden Seniuk Date: Fri, 31 May 2024 09:53:33 -0700 Subject: [PATCH 2/6] fix: verify --- molecule/default/verify.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index 6a0e14a..393550c 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -8,7 +8,6 @@ - name: Verify utilities are available command: > {{ item }} - with_items: with_items: - zint --help From 132255fbc20a2c668352b618dd563f73034cf73d Mon Sep 17 00:00:00 2001 From: Jaden Seniuk Date: Fri, 31 May 2024 10:05:14 -0700 Subject: [PATCH 3/6] fix: add ubuntu 22.04 to test matrix --- .github/workflows/molecule.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 527025e..bb9d07d 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -28,6 +28,7 @@ jobs: matrix: image: - geerlingguy/docker-ubuntu2004-ansible:latest + - geerlingguy/docker-ubuntu2204-ansible:latest steps: - name: checkout uses: actions/checkout@v2 From 555e3c884049fedd3529b4f3045339c59e772309 Mon Sep 17 00:00:00 2001 From: Jaden Seniuk Date: Fri, 31 May 2024 10:13:42 -0700 Subject: [PATCH 4/6] fix: readme update --- README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6cc1a88..4217179 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,13 @@ Zint, first delete `/usr/local/bin/zint`, then install the new version. ## Role Variables -See example playbook. +If these variables are not supplied, the role will just pull the latest version. + +``` +zint_version: 2.13.0 +zint_source: "https://sourceforge.net/projects/zint/files/zint/{{ zint_version }}/zint-{{ zint_version }}-src.tar.gz/download" +zint_source_checksum: 'sha256:a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8' +``` ## Dependencies @@ -24,6 +30,16 @@ None ## Example Playbook +```yaml + # Just download latest + - hosts: servers + - roles: + - name: Install Zint from source + role: acromedia.zint + tags: + - zint + + # ...or download a specific version - hosts: servers - roles: - name: Install Zint from source @@ -33,6 +49,7 @@ None zint_source_checksum: 'sha256:bd286d863bc60d65a805ec3e46329c5273a13719724803b0ac02e5b5804c596a' tags: - zint +``` ## License @@ -40,5 +57,5 @@ GPLv3 ## Author Information -Acro Media Inc. -https://www.acromedia.com/ +Acro Commerce Inc. +https://www.acrocommerce.com/ From eabb54aa97165d99b244ebcb623c7e66139bc8f5 Mon Sep 17 00:00:00 2001 From: Jaden Seniuk Date: Fri, 31 May 2024 10:20:09 -0700 Subject: [PATCH 5/6] Revert "fix: add ubuntu 22.04 to test matrix" This reverts commit 132255fbc20a2c668352b618dd563f73034cf73d. --- .github/workflows/molecule.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index bb9d07d..527025e 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -28,7 +28,6 @@ jobs: matrix: image: - geerlingguy/docker-ubuntu2004-ansible:latest - - geerlingguy/docker-ubuntu2204-ansible:latest steps: - name: checkout uses: actions/checkout@v2 From e5281c343dc472254005f2f266c757d3c87611f0 Mon Sep 17 00:00:00 2001 From: Jaden Seniuk Date: Fri, 31 May 2024 10:23:17 -0700 Subject: [PATCH 6/6] fix: highlighting for docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4217179..caab928 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Zint, first delete `/usr/local/bin/zint`, then install the new version. If these variables are not supplied, the role will just pull the latest version. -``` +```yaml zint_version: 2.13.0 zint_source: "https://sourceforge.net/projects/zint/files/zint/{{ zint_version }}/zint-{{ zint_version }}-src.tar.gz/download" zint_source_checksum: 'sha256:a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8'