diff options
| author | Elizabeth Hunt <me@liz.coffee> | 2025-10-04 16:25:00 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <me@liz.coffee> | 2025-10-04 16:25:25 -0700 |
| commit | 0ba6199538478b22763cc4c768c775a9c20baac9 (patch) | |
| tree | e5f97e9d382b6a869e74b0ec37670fc4cc04770c /tasks | |
| parent | a59455fe4f0d06f85800117d7871496ff9fa916f (diff) | |
| download | infra-0ba6199538478b22763cc4c768c775a9c20baac9.tar.gz infra-0ba6199538478b22763cc4c768c775a9c20baac9.zip | |
Fix some stuff
Diffstat (limited to 'tasks')
| -rw-r--r-- | tasks/copy-rendered-templates-recursive.yml | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tasks/copy-rendered-templates-recursive.yml b/tasks/copy-rendered-templates-recursive.yml index e3311df..b933d0a 100644 --- a/tasks/copy-rendered-templates-recursive.yml +++ b/tasks/copy-rendered-templates-recursive.yml @@ -75,12 +75,13 @@ delegate_to: localhost become: false ansible.builtin.command: - cmd: tar -czf {{ tempdir.path }}/rendered-files.tar.gz -C {{ tempdir.path }} . - creates: "{{ tempdir.path }}/rendered-files.tar.gz" + cmd: tar -czf /tmp/rendered-files-{{ tempdir.path | basename }}.tar.gz -C {{ tempdir.path }} . + register: tar_result + changed_when: tar_result.rc == 0 - name: Transfer tarball to remote host ansible.builtin.copy: - src: "{{ tempdir.path }}/rendered-files.tar.gz" + src: "/tmp/rendered-files-{{ tempdir.path | basename }}.tar.gz" dest: "/tmp/rendered-files.tar.gz" mode: '0644' @@ -106,6 +107,13 @@ path: "/tmp/rendered-files.tar.gz" state: absent +- name: Remove local tarball + delegate_to: localhost + become: false + ansible.builtin.file: + path: "/tmp/rendered-files-{{ tempdir.path | basename }}.tar.gz" + state: absent + - name: Remove local temporary directory delegate_to: localhost become: false |
