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
|
|
|
|
- git: rbkmoney
|
|
|
|
|
2020-05-12 11:10:50 +00:00
|
|
|
/etc/elasticsearch/s3_access
|
|
|
|
file.managed:
|
|
|
|
- contents_pillar: elastic:config:repository-s3:access_key
|
|
|
|
|
|
|
|
/etc/elasticsearch/s3_secret
|
|
|
|
file.managed:
|
|
|
|
- contents_pillar: elastic:config:repository-s3:secret_key
|
|
|
|
|
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
|