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