From 7f71883d0978652ba81cd4c2a5b8c4b76ff3bb6c Mon Sep 17 00:00:00 2001 From: Charles McLaughlin Date: Mon, 27 Feb 2017 18:06:17 -0800 Subject: [PATCH] Download URL configurable via pillar I ran into this problem where the formula can't download and install Consul: https://github.com/saltstack/salt/issues/38730 As a work around, I'm making the download URL configurable. Not sure if many other people will find this useful, so if you don't want to merge it that's fine. For me it's only a temporary fix until I can upgrade Salt. --- consul/defaults.yaml | 1 + consul/install.sls | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/consul/defaults.yaml b/consul/defaults.yaml index 596406c..99fd03c 100644 --- a/consul/defaults.yaml +++ b/consul/defaults.yaml @@ -1,6 +1,7 @@ consul: version: 0.7.0 hash: b350591af10d7d23514ebaa0565638539900cdb3aaa048f077217c4c46653dd8 + download_host: releases.hashicorp.com service: false config: diff --git a/consul/install.sls b/consul/install.sls index ac9a389..f66b5b3 100644 --- a/consul/install.sls +++ b/consul/install.sls @@ -46,7 +46,7 @@ consul-data-dir: consul-download: file.managed: - name: /tmp/consul_{{ consul.version }}_linux_amd64.zip - - source: https://releases.hashicorp.com/consul/{{ consul.version }}/consul_{{ consul.version }}_linux_amd64.zip + - source: https://{{ consul.download_host }}/consul/{{ consul.version }}/consul_{{ consul.version }}_linux_amd64.zip - source_hash: sha256={{ consul.hash }} - unless: test -f /usr/local/bin/consul-{{ consul.version }}