From 9f2a542f43f2c71784a4153b729a50b4dcf2ffed Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Thu, 17 May 2018 21:43:17 -0400 Subject: [PATCH] Moved consul registry address to config --- fabio/defaults.yaml | 4 ++-- fabio/files/fabio.service | 2 +- fabio/service.sls | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fabio/defaults.yaml b/fabio/defaults.yaml index 182bbef..73ac5a0 100644 --- a/fabio/defaults.yaml +++ b/fabio/defaults.yaml @@ -9,8 +9,8 @@ fabio: group: fabio config_file: /etc/fabio/fabio.cfg - consul_address: localhost:8500 data_dir: /var/fabio config: - proxy.addr: :80,:9999 + proxy.addr: :9999 + registry.consul.addr: localhost:8500 diff --git a/fabio/files/fabio.service b/fabio/files/fabio.service index 4783089..b6ae01a 100644 --- a/fabio/files/fabio.service +++ b/fabio/files/fabio.service @@ -5,7 +5,7 @@ After=network.target [Service] EnvironmentFile=-/etc/{% if grains['os_family'] == 'Debian' %}default{% else %}sysconfig{% endif %}/fabio -ExecStart=/usr/local/bin/fabio -cfg {{ config_file }} -registry.consul.addr {{ consul_address }} +ExecStart=/usr/local/bin/fabio -cfg {{ config_file }} ExecReload=/bin/kill -HUP $MAINPID User={{ user }} Group={{ group }} diff --git a/fabio/service.sls b/fabio/service.sls index e1f62f1..e21239e 100644 --- a/fabio/service.sls +++ b/fabio/service.sls @@ -27,7 +27,6 @@ fabio-init-file: user: {{ fabio.user }} group: {{ fabio.group }} config_file: {{ fabio.config_file }} - consul_address: {{ fabio.consul_address }} - mode: 0644 {%- elif salt['test.provider']('service') == 'upstart' %} - source: salt://{{ slspath }}/files/fabio.upstart