diff --git a/README.md b/README.md index dfa89e4..62bb499 100644 --- a/README.md +++ b/README.md @@ -30,18 +30,14 @@ Build and install the [Ubuntu Base Box](https://github.com/rgl/ubuntu-vagrant). Build and install the [Windows Base Box](https://github.com/rgl/windows-2016-vagrant). -Install the required Vagrant plugins: - -```bash -vagrant plugin install vagrant-triggers # see https://github.com/emyl/vagrant-triggers -``` - Add the following entry to your `/etc/hosts` file: ``` 192.168.56.3 nexus.example.com ``` +Install Vagrant 2.1+. + Run `vagrant up --provider=virtualbox # or --provider=libvirt` to launch the environment. See its output to known how to login at the [local Nexus home page](https://nexus.example.com) as `admin` (you can also login with diff --git a/Vagrantfile b/Vagrantfile index 08d44b7..5f2d192 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -56,8 +56,9 @@ Vagrant.configure(2) do |config| config.vm.provision :shell, path: 'provision/windows/ps.ps1', args: ['use-npm-repository.ps1', nexus_domain] end - config.trigger.before :up, :vm => ['nexus'] do + config.trigger.before :up do |trigger| + trigger.only_on = 'nexus' ldap_ca_cert_path = '../windows-domain-controller-vagrant/tmp/ExampleEnterpriseRootCA.der' - run "sh -c 'mkdir -p shared && cp #{ldap_ca_cert_path} shared'" if File.file? ldap_ca_cert_path + trigger.run = {inline: "sh -c 'mkdir -p shared && cp #{ldap_ca_cert_path} shared'"} if File.file? ldap_ca_cert_path end end