From 0161a41941a62ffcf54f458d5c73cb11537235c8 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 18 Oct 2018 21:18:15 -0400 Subject: [PATCH] Redis and Filebeat fixes to point to IP --- salt/logstash/files/dynamic/0900_input_redis.conf | 2 +- salt/logstash/files/dynamic/9999_output_redis.conf | 4 ++-- so-setup-network.sh | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/salt/logstash/files/dynamic/0900_input_redis.conf b/salt/logstash/files/dynamic/0900_input_redis.conf index ed70110dc..660d2e741 100644 --- a/salt/logstash/files/dynamic/0900_input_redis.conf +++ b/salt/logstash/files/dynamic/0900_input_redis.conf @@ -1,4 +1,4 @@ -{%- set master = grains['master'] %} +{% set master = salt['pillar.get']('static:masterip', '') %} input { redis { host => '{{ master }}' diff --git a/salt/logstash/files/dynamic/9999_output_redis.conf b/salt/logstash/files/dynamic/9999_output_redis.conf index 2748209ea..fa650b538 100644 --- a/salt/logstash/files/dynamic/9999_output_redis.conf +++ b/salt/logstash/files/dynamic/9999_output_redis.conf @@ -1,9 +1,9 @@ {%- if salt['grains.get']('role') == 'so-master' %} -{%- set master = salt['pillar.get']('master:mainip', '') -%} +{% set master = salt['pillar.get']('static:masterip', '') %} {%- set nodetype = 'master' %} {%- else %} {%- set nodetype = salt['pillar.get']('node:node_type', 'storage') %} -{%- set master = grains['master'] %} +{% set master = salt['pillar.get']('static:masterip', '') %} {%- endif %} output { redis { diff --git a/so-setup-network.sh b/so-setup-network.sh index 7f73b6f1c..8b39cf6f4 100644 --- a/so-setup-network.sh +++ b/so-setup-network.sh @@ -409,6 +409,7 @@ master_static() { echo " proxy: $PROXY" >> /opt/so/saltstack/pillar/static.sls echo " broversion: $BROVERSION" >> /opt/so/saltstack/pillar/static.sls echo " ids: $NIDS" >> /opt/so/saltstack/pillar/static.sls + echo " masterip: $MAINIP" >> /opt/so/saltstack/pillar/static.sls if [ $MASTERUPDATES == 'MASTER' ]; then echo " masterupdate: 1" >> /opt/so/saltstack/pillar/static.sls else