==> default: stdin: is not a tty
If you're using Vagrant with Ubuntu and getting this annoying (but not impactful) error during provisioning, Just paste this into your Vagrantfile as the first provisioner:
config.vm.provision "fix-no-tty", type: "shell" do |s|
s.privileged = false
s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile"
The issue arises because Ubuntu's default /root/.profile contains a line that prevents messages from being written to root's console by other users. This "mesg n" command fails because it is expecting to be run from an interactive terminal (a tty) and not a script.
The code above simply replaces the original line in /root/.profile with one that checks to see if the current terminal is a tty before running the "mesg n" command. It sets the privileged option of the shell provisioner to false so that we don't get the error during this provisioner and uses sudo instead to get appropriate privileges.
This provisioner is idempotent (meaning, it can be run over and over) and has no security or stability implications of which I am aware. Of course, if part of your provisioning does actually require a TTY, this doesn't really solve the problem. The one common provisioning step that does involve a TTY is packages that expect a configuration is the installation of Debian packages. For this case, you should use dpkg-preconfigure to provide the necessary information up front.
This fix is offered in the public domain and is free for use in any project.