r/collectd-prometheus: Skip firewalld tasks

Some machines, such as the nodes in the Kubernetes cluster, do not use
*firewalld*.  For these machines, we need to skip the `firewalld` tasks,
as they will fail.  The `host_uses_firewalld` variable can be set to
`False` for these machines to do so.
btop
Dustin 2022-08-03 20:53:29 -05:00
parent c8e89a4b16
commit 1214b507c5
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,7 @@
permanent: false permanent: false
immediate: true immediate: true
state: '{{ "enabled" if collectd_prometheus_allow_outside else "disabled" }}' state: '{{ "enabled" if collectd_prometheus_allow_outside else "disabled" }}'
when: host_uses_firewalld|d(true)|bool
tags: firewalld tags: firewalld
- name: ensure firewall is configured for collectd write_prometheus plugin - name: ensure firewall is configured for collectd write_prometheus plugin
@ -48,4 +49,5 @@
permanent: true permanent: true
immediate: false immediate: false
state: '{{ "enabled" if collectd_prometheus_allow_outside else "disabled" }}' state: '{{ "enabled" if collectd_prometheus_allow_outside else "disabled" }}'
when: host_uses_firewalld|d(true)|bool
tags: firewalld tags: firewalld