fix: test fix for bug 24

This commit is contained in:
Imran Iqbal 2019-12-12 05:38:58 +00:00
parent d9c9386038
commit 341fff36ea
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
5 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ prometheus:
# no memcached_exporter in upstream repo - only archive # no memcached_exporter in upstream repo - only archive
# memcached_exporter # memcached_exporter
use_upstream_archive: False use_upstream_archive: true
{%- if grains.os_family in ('CentOS',) %} {%- if grains.os_family in ('CentOS',) %}
use_upstream_repo: False use_upstream_repo: False
{%- endif %} {%- endif %}
@ -58,6 +58,8 @@ prometheus:
source_files: source_files:
prometheus-config-file-file-managed: prometheus-config-file-file-managed:
- 'alt_config.yml.jinja' - 'alt_config.yml.jinja'
prometheus-archive-install-managed-service:
- 'alt_systemd.ini.jinja'
# Pillar-based config # Pillar-based config
config: config:

View File

@ -4,7 +4,6 @@
{#- Get the `tplroot` from `tpldir` #} {#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %} {%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %} {%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
{%- set sls_archive_install = tplroot ~ '.archive' %} {%- set sls_archive_install = tplroot ~ '.archive' %}
{%- if grains.kernel|lower in ('linux',) and p.linux.altpriority|int > 0 %} {%- if grains.kernel|lower in ('linux',) and p.linux.altpriority|int > 0 %}

View File

@ -59,7 +59,7 @@ prometheus-archive-install-{{ name }}-managed-service:
file.managed: file.managed:
- name: {{ p.dir.service }}/{{ name }}.service - name: {{ p.dir.service }}/{{ name }}.service
- source: {{ files_switch(['systemd.ini.jinja'], - source: {{ files_switch(['systemd.ini.jinja'],
lookup='prometheus-archive-install-{{ name }}-managed-service' lookup='prometheus-archive-install-managed-service'
) )
}} }}
- mode: 644 - mode: 644

View File

@ -4,7 +4,6 @@
{#- Get the `tplroot` from `tpldir` #} {#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %} {%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import prometheus with context %} {%- from tplroot ~ "/map.jinja" import prometheus with context %}
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
{%- set sls_service_clean = tplroot ~ '.service.clean' %} {%- set sls_service_clean = tplroot ~ '.service.clean' %}
include: include:

View File

@ -30,7 +30,7 @@ prometheus-config-file-{{ name }}-file-managed:
file.managed: file.managed:
- name: {{ prometheus.dir.etc }}/{{ name }}.yml - name: {{ prometheus.dir.etc }}/{{ name }}.yml
- source: {{ files_switch(['config.yml.jinja'], - source: {{ files_switch(['config.yml.jinja'],
lookup='prometheus-config-file-{{ name }}-file-managed' lookup='prometheus-config-file-file-managed'
) )
}} }}
- mode: 644 - mode: 644