Answering prompt using vagrant file?

Is it possible to add a script to a Vagrantfile that answers a prompt. I am provisioning a ubuntu box for docker = "ubuntu"

config.vm.provision :shell, :inline => "sudo apt-get update"

config.vm.provision :shell, :inline => "sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring"

After running the last command, there is a prompt that asks

  • Access jboss 8080 port inside docker container
  • impossible to delete a container
  • Multiple assemblies with equivalent identity have been imported: '<in-memory assembly>' and '<in-memory assembly>' [Solved]
  • Can Google Kubernetes run Apache Mesos frameworks on top of it?
  • How to store named docker volume with mysql data on external disk (mac os)?
  • Cannot retrieve the stats of my docker containers using Docker APIs
  • Do you want to continue [Y/n]?

  • Packaging an app in docker that can be configured at run time
  • Restart docker when it consumes certain amount of memory
  • How do I advertise AND browse mDNS from within docker container?
  • HyperV is not available on Home editions
  • Docker port mapping not working
  • Get status of an ongoing docker image pull
  • One Solution collect form web for “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.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.