Answering prompt using vagrant file?
An easier solution would be to use the -y
option of apt-get
:
config.vm.provision :shell, :inline => "sudo apt-get -y install linux-image-generic-lts-raring linux-headers-generic-lts-raring"
See the manual:
-y, --yes, --assume-yes Automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package or removing an essential package, occurs then apt-get will abort.