| {%- from "ceilometer/map.jinja" import server with context %} |
| {%- if server.enabled %} |
| |
| ceilometer_server_packages: |
| pkg.installed: |
| - names: {{ server.pkgs }} |
| |
| /etc/ceilometer/ceilometer.conf: |
| file.managed: |
| - source: salt://ceilometer/files/{{ server.version }}/ceilometer-server.conf.{{ grains.os_family }} |
| - template: jinja |
| - require: |
| - pkg: ceilometer_server_packages |
| |
| {%- for publisher_name, publisher in server.get('publisher', {}).iteritems() %} |
| |
| {%- if publisher_name != "default" %} |
| |
| ceilometer_publisher_{{ publisher_name }}_pkg: |
| pkg.latest: |
| - name: ceilometer-publisher-{{ publisher_name }} |
| |
| {%- endif %} |
| |
| {%- endfor %} |
| |
| /etc/ceilometer/pipeline.yaml: |
| file.managed: |
| - source: salt://ceilometer/files/{{ server.version }}/pipeline.yaml |
| - template: jinja |
| - require: |
| - pkg: ceilometer_server_packages |
| |
| ceilometer_server_services: |
| service.running: |
| - names: {{ server.services }} |
| - enable: true |
| - watch: |
| - file: /etc/ceilometer/ceilometer.conf |
| |
| {%- endif %} |