Skip to content

Commit

Permalink
Merge pull request seegno#9 from babilen/dev-system-user
Browse files Browse the repository at this point in the history
Prefix 'user' and 'group' in pillar with 'system_'
  • Loading branch information
nmadhok committed Mar 29, 2015
2 parents dda2887 + 9bffab8 commit 4bc337a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions influxdb/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions influxdb/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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')) %}

Expand Down
9 changes: 5 additions & 4 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ influxdb:
protobuf:
port: 8099
lookup:
config: '/etc/influxdb/config.toml'
confdir: '/etc/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 :

0 comments on commit 4bc337a

Please sign in to comment.