salt-common/sls/elasticsearch/repository-s3.sls

33 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2020-05-12 09:47:04 +00:00
{% import 'pkg/common' as pkg %}
include:
- gentoo.portage.packages
- gentoo.repos.rbkmoney
app-misc/repository-s3-elasticsearch-plugin:
pkg.installed:
- pkgs:
- {{ pkg.gen_atom('app-misc/repository-s3-elasticsearch-plugin') }}
- require:
- file: gentoo.portage.packages
2020-05-18 11:34:24 +00:00
- ini: /etc/portage/repos.conf/rbkmoney.conf
2020-05-12 09:47:04 +00:00
2020-05-15 15:11:14 +00:00
/etc/elasticsearch/s3_access:
2020-05-12 11:10:50 +00:00
file.managed:
2020-05-21 12:41:40 +00:00
- contents_pillar: elastic:repository-s3:access_key
2020-05-12 11:10:50 +00:00
2020-05-15 15:11:14 +00:00
/etc/elasticsearch/s3_secret:
2020-05-12 11:10:50 +00:00
file.managed:
2020-05-21 12:41:40 +00:00
- contents_pillar: elastic:repository-s3:secret_key
2020-05-12 11:10:50 +00:00
2020-05-12 09:47:04 +00:00
update-elasticsearch-keystore:
cmd.run:
- env:
- ES_PATH_CONF: /etc/elasticsearch
2020-05-14 08:09:14 +00:00
- name: "cat /etc/elasticsearch/s3_access | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin --force s3.client.default.access_key && cat /etc/elasticsearch/s3_secret | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin --force s3.client.default.secret_key"
2020-05-12 09:47:04 +00:00
- require:
- pkg: app-misc/elasticsearch
- file: /etc/elasticsearch/
- onchanges:
2020-05-12 11:10:50 +00:00
- file: /etc/elasticsearch/s3_access
- file: /etc/elasticsearch/s3_secret