Merge branch '22203-dunglam2k-s3-path-style'
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / states / alloy_install.sls
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 {%- set alloy = pillar.get('alloy', {'enabled': False}) %}
6
7 {%- if alloy.enabled %}
8 extra_install_alloy:
9   pkg.installed:
10     - name: {{ alloy.package }}
11     - refresh: true
12     - require:
13       - pkgrepo: grafana-package-repo-install-pkgrepo-managed
14
15 extra_alloy_config:
16   file.managed:
17     - name: {{ alloy.config_path }}
18     - contents: {{ alloy.config_contents | yaml_dquote }}
19     - mode: '0640'
20     - user: alloy
21     - group: root
22     - require:
23       - pkg: extra_install_alloy
24
25 extra_alloy_service:
26   service.running:
27     - name: {{ alloy.service }}
28     - enable: true
29     - require:
30       - pkg: extra_install_alloy
31       - file: extra_alloy_config
32     - watch:
33       - file: extra_alloy_config
34 {%- endif %}