From 341fff36ead5fce94c25c0ba8011a15d76f26de6 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Thu, 12 Dec 2019 05:38:58 +0000 Subject: [PATCH] fix: test fix for bug 24 --- pillar.example | 4 +++- prometheus/archive/alternatives/install.sls | 1 - prometheus/archive/install.sls | 2 +- prometheus/config/file/clean.sls | 1 - prometheus/config/file/install.sls | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pillar.example b/pillar.example index c04e8dc..b14139f 100644 --- a/pillar.example +++ b/pillar.example @@ -11,7 +11,7 @@ prometheus: # no memcached_exporter in upstream repo - only archive # memcached_exporter - use_upstream_archive: False + use_upstream_archive: true {%- if grains.os_family in ('CentOS',) %} use_upstream_repo: False {%- endif %} @@ -58,6 +58,8 @@ prometheus: source_files: prometheus-config-file-file-managed: - 'alt_config.yml.jinja' + prometheus-archive-install-managed-service: + - 'alt_systemd.ini.jinja' # Pillar-based config config: diff --git a/prometheus/archive/alternatives/install.sls b/prometheus/archive/alternatives/install.sls index 9d7523d..103139c 100644 --- a/prometheus/archive/alternatives/install.sls +++ b/prometheus/archive/alternatives/install.sls @@ -4,7 +4,6 @@ {#- Get the `tplroot` from `tpldir` #} {%- 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_archive_install = tplroot ~ '.archive' %} {%- if grains.kernel|lower in ('linux',) and p.linux.altpriority|int > 0 %} diff --git a/prometheus/archive/install.sls b/prometheus/archive/install.sls index 406d713..a60090f 100644 --- a/prometheus/archive/install.sls +++ b/prometheus/archive/install.sls @@ -59,7 +59,7 @@ prometheus-archive-install-{{ name }}-managed-service: file.managed: - name: {{ p.dir.service }}/{{ name }}.service - source: {{ files_switch(['systemd.ini.jinja'], - lookup='prometheus-archive-install-{{ name }}-managed-service' + lookup='prometheus-archive-install-managed-service' ) }} - mode: 644 diff --git a/prometheus/config/file/clean.sls b/prometheus/config/file/clean.sls index ae3a75c..e87e6f2 100644 --- a/prometheus/config/file/clean.sls +++ b/prometheus/config/file/clean.sls @@ -4,7 +4,6 @@ {#- Get the `tplroot` from `tpldir` #} {%- set tplroot = tpldir.split('/')[0] %} {%- from tplroot ~ "/map.jinja" import prometheus with context %} -{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} {%- set sls_service_clean = tplroot ~ '.service.clean' %} include: diff --git a/prometheus/config/file/install.sls b/prometheus/config/file/install.sls index 7878afd..69a423f 100644 --- a/prometheus/config/file/install.sls +++ b/prometheus/config/file/install.sls @@ -30,7 +30,7 @@ prometheus-config-file-{{ name }}-file-managed: file.managed: - name: {{ prometheus.dir.etc }}/{{ name }}.yml - source: {{ files_switch(['config.yml.jinja'], - lookup='prometheus-config-file-{{ name }}-file-managed' + lookup='prometheus-config-file-file-managed' ) }} - mode: 644