Skip to content

Getting Started

Tobias edited this page Mar 19, 2018 · 8 revisions

Requirements

Fully functional go installation. If in doubt check your installation by running go env.
Make sure that the variable $GOPATH is set (e.g. to ~/go).

Installation

Use the pre-built binaries

  1. Go to the Releases page
  2. Download the pre-built binary for your operating system and architecture (macOS = Darwin)
  3. Unpack (tar xvzf $file) and copy/or link it to a path, that is within your $PATH variable
  4. Make executable (chmod u+x $file) and run it

Build it yourself

  1. Get the sources and update all its dependencies (-u).

go get -u github.com/thannaske/hcloud-ansible-inv

  1. Build and install the resulting binary to $GOPATH/bin/hcloud-ansible-inv.

go install github.com/thannaske/hcloud-ansible-inv/cmd/hcloud-ansible-inv

If you want to update your installation just follow these two steps again.

Make binary globally available

Unless you have added $GOPATH/bin to your $PATH you need to make the binary globally available in order to use it without typing the whole path to your $GOPATH/bin folder all the time. To do so you could soft-link the binary to a directory that is within your $PATH.

ln -s $GOPATH/bin/hcloud-ansible-inv /usr/bin/hcloud-ansible-inv