Packer.Images/ansible/roles/firstboot/files/ansible_payload/templates/compresstarballs.j2

11 lines
228 B
Plaintext
Raw Normal View History

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