Skip to content

Commit

Permalink
Merge pull request #5 from tokyowizard/fix/boolean
Browse files Browse the repository at this point in the history
fix boolean check for use_librato and use_graphite
  • Loading branch information
MiLk committed Feb 29, 2016
2 parents 562a254 + 2322a90 commit 89e01bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
owner=root
group=root
mode=0644
when: use_librato and collectd_forwarder is defined and collectd_forwarder == inventory_hostname
when: use_librato|bool and collectd_forwarder is defined and collectd_forwarder == inventory_hostname
notify:
- Restart collectd
tags:
Expand Down
6 changes: 3 additions & 3 deletions templates/collectd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ LoadPlugin interface
IgnoreSelected true
</Plugin>

{% if monitor_coretemp %}
{% if monitor_coretemp|bool %}
<Plugin exec>
Exec nobody "/opt/collectd-exec-modules/collectd-coretemp.sh"
</Plugin>
Expand All @@ -105,7 +105,7 @@ LoadPlugin rrdtool

LoadPlugin network
<Plugin network>
{% if collectd_forwarder is defined and collectd_forward_to_logstash %}
{% if collectd_forwarder is defined and collectd_forward_to_logstash|bool %}
<Server "{{ hostvars[collectd_forwarder]['private_ip']|default(hostvars[collectd_forwarder]['ansible_ssh_host']) }}" "25827">
Interface "{{ private_interface }}"
</Server>
Expand Down Expand Up @@ -144,7 +144,7 @@ LoadPlugin df
LoadPlugin python

{% if collectd_forwarder is defined and collectd_forwarder == inventory_hostname %}
{% if use_graphite %}
{% if use_graphite|bool %}
<LoadPlugin write_graphite>
Interval {{ graphite_interval|default('10') }}
</LoadPlugin>
Expand Down

0 comments on commit 89e01bb

Please sign in to comment.