Skip to content

Instantly share code, notes, and snippets.

@ketzacoatl
Last active August 29, 2015 14:26
Show Gist options
  • Save ketzacoatl/d5095f1ca7a14e92212d to your computer and use it in GitHub Desktop.
Save ketzacoatl/d5095f1ca7a14e92212d to your computer and use it in GitHub Desktop.
salt formula to build/install consul-template from source
{%- set repo_root = '/root/consul-template' %}
{%- set revision = 'v0.10.0' %}
include:
- golang
consul-template:
git.latest:
- name: https://github.com/hashicorp/consul-template
- rev: {{ revision }}
- target: {{ repo_root }}
- user: root
- force: True
- force_checkout: True
cmd.run:
- name: make
- cwd: {{ repo_root }}
- env:
- GOPATH: '/root/.go'
- watch:
- git: consul-template
file.copy:
- name: /usr/local/bin/consul-template
- source: {{ repo_root }}/bin/consul-template
- watch:
- git: consul-template
- cmd: consul-template
- require:
- cmd: consul-template
- user: root
- group: root
- mode: 755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment