From 4adc77c7fcd73048a6bf75aa4f9acf02fd3e63f3 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 8 Feb 2018 09:52:04 -0500 Subject: [PATCH] ES salt module - Add elasticsearch user --- pillar/masters/example.sls | 4 ++-- salt/elastic/init.sls | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pillar/masters/example.sls b/pillar/masters/example.sls index b4895bf05..c17933408 100644 --- a/pillar/masters/example.sls +++ b/pillar/masters/example.sls @@ -1,5 +1,5 @@ # Example Pillar file for a master master: - esaccessip: CHANGEME + esaccessip: 127.0.0.1 esheap: CHANGEME - esclustername: CHANGEME + esclustername: {{ grains.host }} diff --git a/salt/elastic/init.sls b/salt/elastic/init.sls index fbbab9445..291238d52 100644 --- a/salt/elastic/init.sls +++ b/salt/elastic/init.sls @@ -2,9 +2,16 @@ {% set esheap = salt['pillar.get'](master:esheap) %} {% set esaccessip = salt['pillar.get'](master:esaccessip) %} +# Add ES user +elasticsearch: + user.present: + - uid: 930 + - gid: 930 + - home: /opt/so/conf/elasticsearch + so-elasticsearch: dockerng.running: - - image: pillaritem/so-logstash + - image: pillaritem/so-elasticsearch - hostname: elasticsearch - user: elasticsearch - environment: