Fix exporters deployment error
On compute nodes we get: cmp01.virtual-mcp11-contrail.local: ---------- ID: libvirt_exporter_service Function: service.running Name: libvirt-exporter Result: False Comment: The following requisites were not found: watch: file: libvirt_exporter_service_config_file Change-Id: I31069ec37702f8466da27b76c0becc6802cea272
This commit is contained in:
parent
1ac10079c9
commit
4943a0ded1
1 changed files with 13 additions and 11 deletions
|
@ -6,7 +6,6 @@
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- names: {{ parameters.packages }}
|
- names: {{ parameters.packages }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
{{ exporter }}_exporter_service:
|
{{ exporter }}_exporter_service:
|
||||||
service.running:
|
service.running:
|
||||||
|
@ -15,13 +14,15 @@
|
||||||
{%- if grains.get('noservices') %}
|
{%- if grains.get('noservices') %}
|
||||||
- onlyif: /bin/false
|
- onlyif: /bin/false
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- if parameters.template is defined %}
|
||||||
- watch:
|
- watch:
|
||||||
- file: {{ exporter }}_exporter_service_config_file
|
- file: {{ exporter }}_exporter_service_config_file
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{%- for svc, svc_parameters in parameters.get('services', {}).iteritems() %}
|
{%- for svc, svc_parameters in parameters.get('services', {}).iteritems() %}
|
||||||
{%- if svc_parameters.get('enabled', False) %}
|
{%- if svc_parameters.get('enabled', False) %}
|
||||||
{%- if svc_parameters.template is defined %}
|
{%- if svc_parameters.template is defined %}
|
||||||
{%- set jmxbind = svc_parameters.get('jmx_bind', {}) %}
|
{%- set jmxbind = svc_parameters.get('jmx_bind', {}) %}
|
||||||
{{ exporter }}_{{ svc }}_exporter_config_file:
|
{{ exporter }}_{{ svc }}_exporter_config_file:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /etc/exporters/{{ exporter }}_{{ svc }}-running.yml
|
- name: /etc/exporters/{{ exporter }}_{{ svc }}-running.yml
|
||||||
|
@ -37,11 +38,11 @@
|
||||||
- pkg: {{ exporter }}_exporter_packages
|
- pkg: {{ exporter }}_exporter_packages
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: {{ exporter }}_exporter_service
|
- service: {{ exporter }}_exporter_service
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if parameters.template is defined %}
|
{%- if parameters.template is defined %}
|
||||||
{%- set template = parameters.template %}
|
{%- set template = parameters.template %}
|
||||||
{%- set bind = svc_parameters.get('bind', {}) %}
|
{%- set bind = svc_parameters.get('bind', {}) %}
|
||||||
{{ exporter }}_exporter_service_config_file:
|
{{ exporter }}_exporter_service_config_file:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /etc/default/{{ exporter }}-exporter
|
- name: /etc/default/{{ exporter }}-exporter
|
||||||
|
@ -58,7 +59,8 @@
|
||||||
- pkg: {{ exporter }}_exporter_packages
|
- pkg: {{ exporter }}_exporter_packages
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: {{ exporter }}_exporter_service
|
- service: {{ exporter }}_exporter_service
|
||||||
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endfor %}
|
||||||
{%- endfor %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
Loading…
Reference in a new issue