geerlingguy / ansible-role-security

Ansible Role - Security

Home Page:https://galaxy.ansible.com/geerlingguy/security/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Service_module

SaiNishanth-cloud opened this issue · comments

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

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.