Skip to content

Commit

Permalink
Merge pull request #602 from roots/roots-post-up-message
Browse files Browse the repository at this point in the history
Vagrant post up message
  • Loading branch information
swalkinshaw authored Jun 24, 2016
2 parents b67aae7 + 8a1a83f commit cdb093a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### HEAD
* Add Vagrant post up message ([#602](https://github.com/roots/trellis/pull/602))
* Fix #468 - Use curl to install wp-cli tab completions ([#593](https://github.com/roots/trellis/pull/593))
* Require Ansible 2.0.2 and remove deploy_helper ([#579](https://github.com/roots/trellis/pull/579))
* Add connection-related cli options to ping command ([#578](https://github.com/roots/trellis/pull/578))
Expand Down
11 changes: 11 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/trusty64'
config.ssh.forward_agent = true

config.vm.post_up_message = post_up_message

# Fix for: "stdin: is not a tty"
# https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042
config.ssh.shell = %{bash -c 'BASH_ENV=/etc/profile exec bash'}
Expand Down Expand Up @@ -136,6 +138,15 @@ def nfs_path(site_name)
"/vagrant-nfs-#{site_name}"
end

def post_up_message
msg = 'Your Trellis Vagrant box is ready to use!'
msg << "\n* Composer and WP-CLI commands need to be run on the virtual machine."
msg << "\n* You can SSH into the machine with `vagrant ssh`."
msg << "\n* Then navigate to your WordPress sites at `/srv/www`."

msg
end

def remote_site_path(site_name)
"/srv/www/#{site_name}/current"
end

0 comments on commit cdb093a

Please sign in to comment.