diff --git a/roles/collectd-prometheus/tasks/main.yml b/roles/collectd-prometheus/tasks/main.yml index 653ac96..bc79ce2 100644 --- a/roles/collectd-prometheus/tasks/main.yml +++ b/roles/collectd-prometheus/tasks/main.yml @@ -40,6 +40,7 @@ permanent: false immediate: true state: '{{ "enabled" if collectd_prometheus_allow_outside else "disabled" }}' + when: host_uses_firewalld|d(true)|bool tags: firewalld - name: ensure firewall is configured for collectd write_prometheus plugin @@ -48,4 +49,5 @@ permanent: true immediate: false state: '{{ "enabled" if collectd_prometheus_allow_outside else "disabled" }}' + when: host_uses_firewalld|d(true)|bool tags: firewalld