From 5c126cd42b3f5be20037650ff78cf3b4052fc4be Mon Sep 17 00:00:00 2001 From: Alan Lam Date: Wed, 8 Jan 2020 11:32:28 -0800 Subject: [PATCH] conform to new build format for vagrant (#153) * conform to new build format for vagrant --- examples/quickstart-vagrant/README.md | 17 +---------------- .../quickstart-vagrant/ansible/playbook.yml | 5 ++++- .../ansible/roles/nebula/tasks/main.yml | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/examples/quickstart-vagrant/README.md b/examples/quickstart-vagrant/README.md index 09942fc..40740d7 100644 --- a/examples/quickstart-vagrant/README.md +++ b/examples/quickstart-vagrant/README.md @@ -2,22 +2,7 @@ This guide is intended to bring up a vagrant environment with 1 lighthouse and 2 generic hosts running nebula. -## Pre-requisites - -There are two pre-requisites prior to bringing up the vagrant environment - - - build the binaries locally for the vagrant deploy - - create a virtualenv for ansible - -### Building the binaries - -Build the `nebula` and `nebula-cert` binaries for vagrant by doing the following - -`make bin-vagrant` (under the src directory with Makefile) - -For convenience, ansible will run this for you in every deploy (see `ansible/playbook.yml`) - -### Creating the virtualenv +## Creating the virtualenv for ansible Within the `quickstart/` directory, do the following diff --git a/examples/quickstart-vagrant/ansible/playbook.yml b/examples/quickstart-vagrant/ansible/playbook.yml index a159d0b..c3c7d9f 100644 --- a/examples/quickstart-vagrant/ansible/playbook.yml +++ b/examples/quickstart-vagrant/ansible/playbook.yml @@ -8,7 +8,10 @@ connection: local hosts: localhost tasks: - - command: chdir=../../../ make bin-vagrant + - command: chdir=../../../ make build/linux-amd64/"{{ item }}" + with_items: + - nebula + - nebula-cert tags: - build-nebula diff --git a/examples/quickstart-vagrant/ansible/roles/nebula/tasks/main.yml b/examples/quickstart-vagrant/ansible/roles/nebula/tasks/main.yml index d6be5f1..ffc89d5 100644 --- a/examples/quickstart-vagrant/ansible/roles/nebula/tasks/main.yml +++ b/examples/quickstart-vagrant/ansible/roles/nebula/tasks/main.yml @@ -8,7 +8,7 @@ - nebula-conf - name: install built nebula binary - copy: src=../../../../../{{ item }} dest=/usr/local/bin mode=0755 + copy: src="../../../../../build/linux-amd64/{{ item }}" dest="/usr/local/bin" mode=0755 with_items: - nebula - nebula-cert