Created
March 23, 2021 16:36
-
-
Save brandonb927/10495ef6abe0cd47b5793e79fdbabb2c to your computer and use it in GitHub Desktop.
A "truly noninteractive" Ubuntu-based Packer HCL template for dist-upgrade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build { | |
# ... | |
provisioner "shell" { | |
inline = [ | |
"echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections", | |
"sudo apt-get update", | |
"sudo apt-get dist-upgrade -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef -y --allow-downgrades --allow-remove-essential --allow-change-held-packages", | |
"sudo apt-get autoremove -y", | |
"sudo apt-get clean", | |
] | |
} | |
# ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment