From 3d48d953e1fa8c810897fae9fb51c59bd90c6391 Mon Sep 17 00:00:00 2001 From: Wolodja Wentland Date: Fri, 27 Mar 2015 11:00:29 +0100 Subject: [PATCH 1/2] Add missing group to pillar.example --- pillar.example | 1 + 1 file changed, 1 insertion(+) diff --git a/pillar.example b/pillar.example index daab54e..1415435 100644 --- a/pillar.example +++ b/pillar.example @@ -15,6 +15,7 @@ influxdb: lookup: config: '/etc/influxdb/config.toml' confdir: '/etc/influxdb' + group: influxdb init_dir: '/etc/init.d' logrotate_conf: '/etc/logrotate.d/influxdb' user: influxdb From 9bffab8c66222c759f99b2710a68f4a38326df8e Mon Sep 17 00:00:00 2001 From: Wolodja Wentland Date: Fri, 27 Mar 2015 11:12:51 +0100 Subject: [PATCH 2/2] Prefix 'user' and 'group' in pillar with 'system_' This is necessary to differentiate the system user, group settings from those that the influxdb modules will use by default for db maintenance. --- influxdb/init.sls | 8 ++++---- influxdb/map.jinja | 8 ++++---- pillar.example | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/influxdb/init.sls b/influxdb/init.sls index a189d2a..ef1075c 100644 --- a/influxdb/init.sls +++ b/influxdb/init.sls @@ -50,12 +50,12 @@ influxdb_init: influxdb_group: group.present: - - name: {{ influxdb_settings.group }} + - name: {{ influxdb_settings.system_group }} - system: True influxdb_user: user.present: - - name: {{ influxdb_settings.user }} + - name: {{ influxdb_settings.system_user }} - fullname: {{ influxdb_settings.fullname }} - shell: {{ influxdb_settings.shell }} - home: {{ influxdb_settings.home }} @@ -66,8 +66,8 @@ influxdb_user: influxdb_log: file.directory: - name: {{ influxdb_settings.logging.directory }} - - user: {{ influxdb_settings.user }} - - group: {{ influxdb_settings.group }} + - user: {{ influxdb_settings.system_user }} + - group: {{ influxdb_settings.system_group }} - mode: 755 - require: - group: influxdb_group diff --git a/influxdb/map.jinja b/influxdb/map.jinja index a42d23a..bc35866 100644 --- a/influxdb/map.jinja +++ b/influxdb/map.jinja @@ -2,24 +2,24 @@ 'Debian': { 'config': '/etc/influxdb/config.toml', 'fullname': 'InfluxDB Service User', - 'group': 'influxdb', 'home': '/opt/influxdb', 'init_dir': '/etc/init.d', 'logrotate_conf': '/etc/logrotate.d/influxdb', 'service': 'influxdb', 'shell': '/bin/false', - 'user': 'influxdb', + 'system_group': 'influxdb', + 'system_user': 'influxdb', }, 'RedHat': { 'config': '/etc/influxdb/config.toml', 'fullname': 'InfluxDB Service User', - 'group': 'influxdb', 'home': '/opt/influxdb', 'init_dir': '/etc/init.d', 'logrotate_conf': '/etc/logrotate.d/influxdb', 'service': 'influxdb', 'shell': '/bin/false', - 'user': 'influxdb', + 'system_group': 'influxdb', + 'system_user': 'influxdb', }, }, merge=salt['pillar.get']('influxdb:lookup')) %} diff --git a/pillar.example b/pillar.example index 1415435..e60d98d 100644 --- a/pillar.example +++ b/pillar.example @@ -13,14 +13,14 @@ influxdb: protobuf: port: 8099 lookup: - config: '/etc/influxdb/config.toml' confdir: '/etc/influxdb' - group: influxdb - init_dir: '/etc/init.d' - logrotate_conf: '/etc/logrotate.d/influxdb' - user: influxdb + config: '/etc/influxdb/config.toml' fullname: 'InfluxDB Service User' home: '/opt/influxdb' + init_dir: '/etc/init.d' + logrotate_conf: '/etc/logrotate.d/influxdb' shell: '/bin/false' + system_group: influxdb + system_user: influxdb # vi: set ft=yaml :