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