Updated user and group for kibana files (#37)

This commit is contained in:
amalgamm 2019-10-25 15:25:32 +03:00 committed by niku64
parent 6b948c1b69
commit 205efeacb3
2 changed files with 13 additions and 2 deletions

View File

@ -47,13 +47,13 @@ if out in tls.keys():
if pemtype == 'key': out_ssl['key'] = path if pemtype == 'key': out_ssl['key'] = path
if pemtype == 'ca': out_ssl['certificateAuthorities'] = [path] if pemtype == 'ca': out_ssl['certificateAuthorities'] = [path]
File.managed( File.managed(
path, mode=600, user='root', group='root', path, mode=600, user='kibana', group='kibana',
contents=contents, require=[File(conf_path)]) contents=contents, require=[File(conf_path)])
dictupdate.update(config, pillar('kibana:config', {})) dictupdate.update(config, pillar('kibana:config', {}))
File.managed( File.managed(
conf_path + 'kibana.yml', conf_path + 'kibana.yml',
mode=640, user='root', group='root', mode=640, user='kibana', group='kibana',
contents="# This file is generated by Salt\n" + yaml.dump(config), contents="# This file is generated by Salt\n" + yaml.dump(config),
require=[File(conf_path)]) require=[File(conf_path)])

View File

@ -17,3 +17,14 @@ kibana:
{% if opendistro_enabled %} {% if opendistro_enabled %}
- pkg: app-misc/opendistro-security-kibana-plugin - pkg: app-misc/opendistro-security-kibana-plugin
{% endif %} {% endif %}
- file: /var/lib/kibana/
/var/lib/kibana/:
file.directory:
- mode: 755
- user: kibana
- group: kibana
- recurse:
- user
- group