From 968b1e59a70c3b8193142dad3037d243f1329eb0 Mon Sep 17 00:00:00 2001 From: soblin Date: Sat, 22 Aug 2026 02:38:02 +0900 Subject: [PATCH] fix(ansible): download the archive of the pinned version get_url does not re-download when dest already exists, so a stale archive left in /tmp by a previous run was unarchived again after a version bump. The command stayed at the old version while the version stamp was updated to the new one. Put the version in the dest file name so that a different version is always a different file. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_018aVdWSLTWB8VmHUBKgBVcN --- ansible/roles/dev_tools/tasks/commands/act.yaml | 6 ++++-- ansible/roles/dev_tools/tasks/commands/difft.yaml | 6 ++++-- ansible/roles/dev_tools/tasks/commands/ghq.yaml | 6 ++++-- ansible/roles/fonts/tasks/main.yaml | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ansible/roles/dev_tools/tasks/commands/act.yaml b/ansible/roles/dev_tools/tasks/commands/act.yaml index 3d4d0e8..a273a97 100644 --- a/ansible/roles/dev_tools/tasks/commands/act.yaml +++ b/ansible/roles/dev_tools/tasks/commands/act.yaml @@ -22,11 +22,13 @@ - name: download act ansible.builtin.get_url: url: https://github.com/nektos/act/releases/download/{{ act_version }}/act_Linux_x86_64.tar.gz - dest: /tmp/act.tar.gz + # NOTE: the version is in the file name because get_url does not + # re-download when dest already exists + dest: /tmp/act-{{ act_version }}.tar.gz - name: unarchive act ansible.builtin.unarchive: - src: /tmp/act.tar.gz + src: /tmp/act-{{ act_version }}.tar.gz dest: /tmp - name: install act diff --git a/ansible/roles/dev_tools/tasks/commands/difft.yaml b/ansible/roles/dev_tools/tasks/commands/difft.yaml index 3f0e93c..c655a10 100644 --- a/ansible/roles/dev_tools/tasks/commands/difft.yaml +++ b/ansible/roles/dev_tools/tasks/commands/difft.yaml @@ -22,11 +22,13 @@ - name: download difftastic ansible.builtin.get_url: url: https://github.com/Wilfred/difftastic/releases/download/{{ difft_version }}/difft-x86_64-unknown-linux-gnu.tar.gz - dest: /tmp/difftastic.tar.gz + # NOTE: the version is in the file name because get_url does not + # re-download when dest already exists + dest: /tmp/difftastic-{{ difft_version }}.tar.gz - name: install difftastic ansible.builtin.unarchive: - src: /tmp/difftastic.tar.gz + src: /tmp/difftastic-{{ difft_version }}.tar.gz # NOTE: only contains "difft" file dest: "{{ lookup('env','HOME') }}/.local/bin/" diff --git a/ansible/roles/dev_tools/tasks/commands/ghq.yaml b/ansible/roles/dev_tools/tasks/commands/ghq.yaml index 61e5425..b17e9fa 100644 --- a/ansible/roles/dev_tools/tasks/commands/ghq.yaml +++ b/ansible/roles/dev_tools/tasks/commands/ghq.yaml @@ -23,11 +23,13 @@ - name: download binary ansible.builtin.get_url: url: https://github.com/x-motemen/ghq/releases/download/{{ ghq_version }}/ghq_linux_amd64.zip - dest: /tmp/ghq_linux_amd64.zip + # NOTE: the version is in the file name because get_url does not + # re-download when dest already exists + dest: /tmp/ghq-{{ ghq_version }}.zip - name: unarchive ghq ansible.builtin.unarchive: - src: /tmp/ghq_linux_amd64.zip + src: /tmp/ghq-{{ ghq_version }}.zip dest: /tmp/ - name: install binary diff --git a/ansible/roles/fonts/tasks/main.yaml b/ansible/roles/fonts/tasks/main.yaml index 691b698..373aa93 100644 --- a/ansible/roles/fonts/tasks/main.yaml +++ b/ansible/roles/fonts/tasks/main.yaml @@ -37,11 +37,13 @@ - name: download Moralerspace zip file ansible.builtin.get_url: url: https://github.com/yuru7/moralerspace/releases/download/{{ moralerspace_version }}/MoralerspaceHW_{{ moralerspace_version }}.zip - dest: /tmp/MoralerspaceHW.zip + # NOTE: the version is in the file name because get_url does + # not re-download when dest already exists + dest: /tmp/MoralerspaceHW_{{ moralerspace_version }}.zip - name: unarchive Moralerspace zip file ansible.builtin.unarchive: - src: /tmp/MoralerspaceHW.zip + src: /tmp/MoralerspaceHW_{{ moralerspace_version }}.zip dest: /usr/local/share/fonts/ include: - MoralerspaceHW_{{ moralerspace_version }}/MoralerspaceNeonHW-Regular.ttf