fix(linux): service.args is freebsd
This commit is contained in:
parent
9b6c13d62c
commit
ceb9863749
@ -4,7 +4,9 @@
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
|
||||
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
|
||||
{%- set sls_service_clean = tplroot ~ '.service.clean' %}
|
||||
|
||||
{%- if grains.os_family in ('FreeBSD',) %}
|
||||
{%- set sls_service_clean = tplroot ~ '.service.clean' %}
|
||||
|
||||
include:
|
||||
- {{ sls_service_clean }}
|
||||
@ -36,3 +38,4 @@ prometheus-service-args-clean-{{ name }}:
|
||||
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
@ -4,14 +4,18 @@
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
|
||||
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
|
||||
{%- set sls_config_users = tplroot ~ '.config.users' %}
|
||||
{%- set sls_archive_install = tplroot ~ '.archive.install' %}
|
||||
{%- set sls_package_install = tplroot ~ '.package.install' %}
|
||||
|
||||
{%- if grains.os_family in ('FreeBSD',) %}
|
||||
{%- set sls_config_users = tplroot ~ '.config.users' %}
|
||||
{%- set sls_service_running = tplroot ~ '.service.running' %}
|
||||
{%- set sls_archive_install = tplroot ~ '.archive.install' %}
|
||||
{%- set sls_package_install = tplroot ~ '.package.install' %}
|
||||
|
||||
|
||||
include:
|
||||
- {{ sls_archive_install if p.pkg.use_upstream_archive else sls_package_install }}
|
||||
- {{ sls_config_users }}
|
||||
- {{ sls_service_running }}
|
||||
|
||||
{%- for name in p.wanted.component %}
|
||||
{%- if 'service' in p.pkg.component[name] and 'args' in p.pkg.component[name]['service'] %}
|
||||
@ -73,3 +77,4 @@ prometheus-service-args-{{ name }}-install:
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
@ -5,10 +5,8 @@
|
||||
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
|
||||
{%- set sls_config_file = tplroot ~ '.config.file' %}
|
||||
{%- set sls_config_environ = tplroot ~ '.config.environ' %}
|
||||
{%- set sls_service_args = tplroot ~ '.service.args.install' %}
|
||||
|
||||
include:
|
||||
- {{ sls_service_args }}
|
||||
- {{ sls_config_file }}
|
||||
- {{ sls_config_environ }}
|
||||
|
||||
@ -25,7 +23,6 @@ prometheus-service-running-{{ name }}-unmasked:
|
||||
- require_in:
|
||||
- service: prometheus-service-running-{{ name }}
|
||||
- require:
|
||||
- sls: {{ sls_service_args }}
|
||||
- sls: {{ sls_config_file }}
|
||||
- file: prometheus-config-file-etc-file-directory
|
||||
|
||||
@ -43,7 +40,6 @@ prometheus-service-running-{{ name }}:
|
||||
{%- endif %}
|
||||
- enable: True
|
||||
- require:
|
||||
- sls: {{ sls_service_args }}
|
||||
- sls: {{ sls_config_file }}
|
||||
{%- if p.wanted.firewall %}
|
||||
firewalld.present:
|
||||
|
Loading…
Reference in New Issue
Block a user