{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/6051","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6051/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6051/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6051/events","html_url":"https://github.com/mitchellh/vagrant/issues/6051","id":97820021,"number":6051,"title":"Script provisioner never terminates","user":{"login":"rfkrocktk","id":347571,"avatar_url":"https://avatars.githubusercontent.com/u/347571?v=3","gravatar_id":"","url":"https://api.github.com/users/rfkrocktk","html_url":"https://github.com/rfkrocktk","followers_url":"https://api.github.com/users/rfkrocktk/followers","following_url":"https://api.github.com/users/rfkrocktk/following{/other_user}","gists_url":"https://api.github.com/users/rfkrocktk/gists{/gist_id}","starred_url":"https://api.github.com/users/rfkrocktk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfkrocktk/subscriptions","organizations_url":"https://api.github.com/users/rfkrocktk/orgs","repos_url":"https://api.github.com/users/rfkrocktk/repos","events_url":"https://api.github.com/users/rfkrocktk/events{/privacy}","received_events_url":"https://api.github.com/users/rfkrocktk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/vagrant/labels/waiting-reply","name":"waiting-reply","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-28T23:01:00Z","updated_at":"2015-08-10T18:44:31Z","closed_at":null,"body":"I have a multi-machine Vagrant setup. My Vagrantfile looks like this:\r\n\r\n```\r\n# -*- mode: ruby -*-\r\n# vi: set ft=ruby :\r\n\r\n# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!\r\nVAGRANTFILE_API_VERSION = \"2\"\r\n\r\nVagrant.configure(VAGRANTFILE_API_VERSION) do |config|\r\n    # Use Phusion's Ubuntu 14.04 box with support for Docker\r\n    config.vm.box = \"phusion-open-ubuntu-14.04-amd64\"\r\n    config.vm.box_url = \"https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box\"\r\n    # tty stuff\r\n    config.ssh.pty = true\r\n\r\n    # Configure the VirtualBox Provider\r\n    config.vm.provider :virtualbox do |vb|\r\n        # Give the VM 1GB of RAM\r\n        vb.customize [\"modifyvm\", :id, \"--memory\", \"1024\"]\r\n    end\r\n\r\n    # per-machine changes\r\n    config.vm.define \"kibana\" do |kibana|\r\n        kibana.vm.hostname = \"kibana1\"\r\n\r\n        kibana.vm.provision \"shell\", path: \"conf/scripts/upgrade-latest-puppet.sh\", run: \"once\"\r\n\r\n        kibana.vm.provision :puppet do |puppet|\r\n            puppet.hiera_config_path = \"conf/hiera.yaml\"\r\n            puppet.manifests_path = \"manifests\"\r\n            puppet.module_path = \"modules\"\r\n            puppet.manifest_file = \"kibana1.pp\"\r\n\r\n            puppet.facter = {\r\n                \"is_vagrant\" => true,\r\n            }\r\n        end\r\n    end\r\nend\r\n```\r\n\r\nI have defined two provisioners, one is a shell script and the other is Puppet, in that order.\r\n\r\nMy `conf/scripts/upgrade-latest-puppet.sh` looks like this:\r\n\r\n```\r\n#!/bin/bash\r\n\r\nDEBIAN_FRONTEND=noninteractive apt-get update |& tee -a /tmp/apt.log && \\\r\n    DEBIAN_FRONTEND=noninteractive apt-get install --yes puppet |& tee -a /tmp/apt.log\r\n\r\necho \"process exited...\" |& tee -a /tmp/apt.log\r\n\r\nexit 0\r\n```\r\n\r\nI have everything logged to `/tmp/apt.log` in the machine. While doing `vagrant up`, I `vagrant ssh` into the machine and tail the file. I see \"process exited\" from the echo statement, but the shell provisioner never terminates:\r\n\r\n```\r\nBringing machine 'kibana' up with 'virtualbox' provider...\r\n==> kibana: Importing base box 'phusion-open-ubuntu-14.04-amd64'...\r\n==> kibana: Matching MAC address for NAT networking...\r\n==> kibana: Setting the name of the VM: puppet_kibana_1438123500249_3721\r\n==> kibana: Clearing any previously set forwarded ports...\r\n==> kibana: Clearing any previously set network interfaces...\r\n==> kibana: Preparing network interfaces based on configuration...\r\n    kibana: Adapter 1: nat\r\n==> kibana: Forwarding ports...\r\n    kibana: 22 => 2222 (adapter 1)\r\n==> kibana: Running 'pre-boot' VM customizations...\r\n==> kibana: Booting VM...\r\n==> kibana: Waiting for machine to boot. This may take a few minutes...\r\n    kibana: SSH address: 127.0.0.1:2222\r\n    kibana: SSH username: vagrant\r\n    kibana: SSH auth method: private key\r\n    kibana: Warning: Connection timeout. Retrying...\r\n    kibana: \r\n    kibana: Vagrant insecure key detected. Vagrant will automatically replace\r\n    kibana: this with a newly generated keypair for better security.\r\n    kibana: \r\n    kibana: Inserting generated public key within guest...\r\n    kibana: Removing insecure key from the guest if its present...\r\n    kibana: Key inserted! Disconnecting and reconnecting using new SSH key...\r\n==> kibana: Machine booted and ready!\r\n==> kibana: Checking for guest additions in VM...\r\n==> kibana: Setting hostname...\r\n==> kibana: Mounting shared folders...\r\n    kibana: /vagrant => /home/tkocheran/Documents/Development/chromeriver-elk/puppet\r\n    kibana: /tmp/vagrant-puppet/modules-c105fde19be8ba0d62cee003ed9aa016 => /home/tkocheran/Documents/Development/chromeriver-elk/puppet/modules\r\n    kibana: /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513 => /home/tkocheran/Documents/Development/chromeriver-elk/puppet/manifests\r\n==> kibana: Running provisioner: shell...\r\n    kibana: Running: /tmp/vagrant-shell20150728-27168-1ennj6c.sh\r\n```\r\n\r\nI'm on Vagrant 1.7.4 and VirtualBox 4.3.30. My host operating system is elementary Freya, which is Ubuntu 14.04, kernel 3.19.0-25-generic."},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/129561867","html_url":"https://github.com/mitchellh/vagrant/issues/6051#issuecomment-129561867","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6051","id":129561867,"user":{"login":"b-long","id":66993,"avatar_url":"https://avatars.githubusercontent.com/u/66993?v=3","gravatar_id":"","url":"https://api.github.com/users/b-long","html_url":"https://github.com/b-long","followers_url":"https://api.github.com/users/b-long/followers","following_url":"https://api.github.com/users/b-long/following{/other_user}","gists_url":"https://api.github.com/users/b-long/gists{/gist_id}","starred_url":"https://api.github.com/users/b-long/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b-long/subscriptions","organizations_url":"https://api.github.com/users/b-long/orgs","repos_url":"https://api.github.com/users/b-long/repos","events_url":"https://api.github.com/users/b-long/events{/privacy}","received_events_url":"https://api.github.com/users/b-long/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T18:44:31Z","updated_at":"2015-08-10T18:44:31Z","body":"I'm debugging a similar issue.  Is there a command-line flag to skip a specific provisioner?  Something that's the opposite of [`--provision-with`](http://docs.vagrantup.com/v2/cli/up.html) ? "}}