Skip to content

Commit

Permalink
Update and simplify Vagrant instructions.
Browse files Browse the repository at this point in the history
Since the chpasswd script was just a one-liner, why not include it w/ the `inline:` option when provisioning the VM? This makes the code a little bit simpler. It also updates the syntax for Vagrant to be inline with their docs.
  • Loading branch information
brettchalupa committed Aug 14, 2014
1 parent d92680e commit 220e535
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions README.md
Expand Up @@ -171,21 +171,13 @@ If you're using Sunzi with [Vagrant](http://vagrantup.com/), make sure that you
An easy way is to edit `Vagrantfile`:

```ruby
Vagrant::Config.run do |config|
config.vm.provision :shell do |shell|
shell.path = "chpasswd.sh"
Vagrant.configure("2") do |config|
config.vm.provision "shell",
inline: "sudo echo 'root:vagrant' | /usr/sbin/chpasswd"
end
end
```

with `chpasswd.sh`:

```bash
#!/bin/bash

sudo echo 'root:vagrant' | /usr/sbin/chpasswd
```

and now run `vagrant up`, it will change the root password to `vagrant`.

Also keep in mind that you need to specify the port number 2222.
Expand Down

0 comments on commit 220e535

Please sign in to comment.