Added additional directories
This commit is contained in:
parent
056a450ad0
commit
5ee01ee3de
1 changed files with 12 additions and 0 deletions
|
@ -36,6 +36,18 @@
|
|||
{%- for svc, svc_parameters in parameters.get('services', {}).iteritems() %}
|
||||
{%- if svc_parameters.get('enabled', False) %}
|
||||
|
||||
{%- for svc_directory in svc_parameters.get('directories', []) %}
|
||||
{{ exporter }}_{{ svc }}_{{ svc_directory.replace('/', '_') }}_exporter_directories:
|
||||
file.directory:
|
||||
- name: {{ svc_directory }}
|
||||
- user: {{ svc_parameters.get('user', 'root') }}
|
||||
- group: {{ svc_parameters.get('group', 'root') }}
|
||||
- makedirs: True
|
||||
- require_in:
|
||||
- file: {{ exporter }}_{{ svc }}_exporter_systemd_unit
|
||||
- service: {{ exporter }}_{{ svc }}_exporter_service
|
||||
{%- endfor %}
|
||||
|
||||
{{ exporter }}_{{ svc }}_exporter_systemd_unit:
|
||||
file.managed:
|
||||
- name: /etc/systemd/system/{{ svc }}.service
|
||||
|
|
Loading…
Reference in a new issue