Service_module
SaiNishanth-cloud opened this issue · comments
Sai Nishanth commented
Whenever I am trying to enable and start fail2ban
- name: Ensure fail2ban is running and enabled service.
service:
name: fail2ban
state: started
enabled: yes
I am getting this error.
fatal: [localhost]: FAILED! => {"changed": false, "msg": "get_service_tools not implemented on target platform"}
can anyone can help me out please.
Thanks for your time
Sai Nishanth commented
I am getting this error because I was trying to execute on my local which is Mac OS.
when: ansible_facts['os_family'] == "Debian"
I have used this condition so that it will only execute when the target platform is of Debian.