From 46a927b777f9da9bd230f631223b052ad2c58dd7 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Wed, 23 Nov 2022 13:30:32 +0100 Subject: [PATCH] Fix script logic;Remove source files --- .../files/ansible_payload/templates/compresstarballs.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/templates/compresstarballs.j2 b/ansible/roles/firstboot/files/ansible_payload/templates/compresstarballs.j2 index 69021ef..9accfa2 100644 --- a/ansible/roles/firstboot/files/ansible_payload/templates/compresstarballs.j2 +++ b/ansible/roles/firstboot/files/ansible_payload/templates/compresstarballs.j2 @@ -1,10 +1,10 @@ #!/bin/bash # Change working directory -popd {{ _template.service.workingdir }} +pushd {{ _template.service.workingdir }} # Compress *.tar files -if tar -czf image-tarballs.tgz *.tar; then +if tar -czf image-tarballs.tgz *.tar --remove-files; then # Disable systemd unit systemctl disable {{ _template.service.name }} fi