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

11 lines
244 B
Plaintext
Raw Normal View History

#!/bin/bash
# Change working directory
2022-11-23 12:30:32 +00:00
pushd {{ _template.service.workingdir }}
# Compress *.tar files
2022-11-23 12:30:32 +00:00
if tar -czf image-tarballs.tgz *.tar --remove-files; then
# Disable systemd unit
systemctl disable {{ _template.service.name }}
fi