Packer.Images/ansible/roles/firstboot/files/ansible_payload/templates/compresstarballs.j2
Danny Bessems 46a927b777
All checks were successful
continuous-integration/drone/push Build is passing
Fix script logic;Remove source files
2022-11-23 13:30:32 +01:00

11 lines
244 B
Django/Jinja

#!/bin/bash
# Change working directory
pushd {{ _template.service.workingdir }}
# Compress *.tar files
if tar -czf image-tarballs.tgz *.tar --remove-files; then
# Disable systemd unit
systemctl disable {{ _template.service.name }}
fi