Last active
April 24, 2017 17:36
-
-
Save cmarzullo/f13221e6dac191ef86d7d35564ac1b3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for plugin, data in collectd.plugins.iteritems() %} | |
collectd_config_{{ plugin }}: | |
file.{{ data.state }}: | |
- name: '/etc/collectd/collectd.conf.d/{{ plugin }}.conf' | |
- watch_in: | |
- service: collectd_service | |
{% if data.state == 'managed' -%} | |
- source: 'salt://collectd/files/collectd.conf.d/{{ plugin }}.conf.j2' | |
- user: 'root' | |
- group: 'root' | |
- mode: 0644 | |
- template: jinja | |
- data: {{ data }} | |
{%- endif %} | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- from "collectd/map.jinja" import collectd with context -%} | |
{% if data.disks is defined -%} | |
LoadPlugin smart | |
<Plugin smart> | |
{% for disk in data.disks -%} | |
Disk "{{ disk }}" | |
{% endfor %} | |
</Plugin> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment