Commit 3e2bd2c7 authored by Mathias BOCQUET's avatar Mathias BOCQUET

check service with service_facts

parent db08b351
......@@ -4,4 +4,7 @@
service:
name: fail2ban
state: restarted
when:
- "'fail2ban' in services"
- ansible_facts.services['fail2ban']['state'] == 'running'
...
......@@ -7,6 +7,12 @@
- fail2ban
- package
- name: service_facts
service_facts:
tags:
- fail2ban
- facts
- name: "{{ fail2ban_jail_local }}"
template:
src: 'jail.local.j2'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment