Updated consul to use /opt/consul and default to 1.4.0
This commit is contained in:
parent
891fc58676
commit
b481ca7192
5 changed files with 9 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
consul:
|
||||
version: 0.7.0
|
||||
version: 1.4.0
|
||||
download_host: releases.hashicorp.com
|
||||
|
||||
service: false
|
||||
|
|
|
@ -5,7 +5,7 @@ After=network.target
|
|||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/{% if grains['os_family'] == 'Debian' %}default{% else %}sysconfig{% endif %}/consul
|
||||
ExecStart=/usr/local/bin/consul agent -config-dir=/etc/consul.d
|
||||
ExecStart=/opt/consul/bin/consul agent -config-dir=/etc/consul.d
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillSignal=TERM
|
||||
User={{ user }}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
. /etc/rc.d/init.d/functions
|
||||
|
||||
prog="consul"
|
||||
exec="/usr/local/bin/$prog"
|
||||
exec="/opt/consul/bin/$prog"
|
||||
pidfile="/var/run/$prog.pid"
|
||||
lockfile="/var/lock/subsys/$prog"
|
||||
logfile="/var/log/$prog"
|
||||
|
|
|
@ -18,7 +18,7 @@ script
|
|||
|
||||
exec start-stop-daemon --start \
|
||||
--chuid ${CONSUL_USER:-consul}:${CONSUL_GROUP:-consul} \
|
||||
--exec /usr/local/bin/consul agent -- \
|
||||
--exec /opt/consul/bin/consul agent -- \
|
||||
-config-dir="/etc/consul.d" \
|
||||
${CONSUL_FLAGS} \
|
||||
>> /var/log/consul.log 2>&1
|
||||
|
|
|
@ -6,7 +6,7 @@ consul-dep-unzip:
|
|||
|
||||
consul-bin-dir:
|
||||
file.directory:
|
||||
- name: /usr/local/bin
|
||||
- name: /opt/consul/bin
|
||||
- makedirs: True
|
||||
|
||||
# Create consul user
|
||||
|
@ -47,7 +47,7 @@ consul-download:
|
|||
- name: /tmp/consul_{{ consul.version }}_linux_{{ consul.arch }}.zip
|
||||
- source: https://{{ consul.download_host }}/consul/{{ consul.version }}/consul_{{ consul.version }}_linux_{{ consul.arch }}.zip
|
||||
- source_hash: https://releases.hashicorp.com/consul/{{ consul.version }}/consul_{{ consul.version }}_SHA256SUMS
|
||||
- unless: test -f /usr/local/bin/consul-{{ consul.version }}
|
||||
- unless: test -f /opt/consul/bin/consul-{{ consul.version }}
|
||||
|
||||
consul-extract:
|
||||
cmd.wait:
|
||||
|
@ -57,10 +57,10 @@ consul-extract:
|
|||
|
||||
consul-install:
|
||||
file.rename:
|
||||
- name: /usr/local/bin/consul-{{ consul.version }}
|
||||
- name: /opt/consul/bin/consul-{{ consul.version }}
|
||||
- source: /tmp/consul
|
||||
- require:
|
||||
- file: /usr/local/bin
|
||||
- file: /opt/consul/bin
|
||||
- watch:
|
||||
- cmd: consul-extract
|
||||
|
||||
|
@ -73,6 +73,6 @@ consul-clean:
|
|||
consul-link:
|
||||
file.symlink:
|
||||
- target: consul-{{ consul.version }}
|
||||
- name: /usr/local/bin/consul
|
||||
- name: /opt/consul/bin/consul
|
||||
- watch:
|
||||
- file: consul-install
|
||||
|
|
Loading…
Reference in a new issue