Oefenweb / ansible-fail2ban

Ansible role to set up fail2ban in Debian-like systems
MIT License
117 stars 55 forks source link

Fixed error in Debian 9 distribution facts - Ansible 2.8 update #57

Closed santiagomr closed 5 years ago

santiagomr commented 5 years ago

As it was commented here, since the update to Ansible 2.8, the role is failing to run on Debian 9.

This is due to Ansible 2.8 uses a new backend library for the ansibledistribution* group of facts

The information returned for the ansibledistribution* group of facts may have changed slightly. Ansible 2.8 uses a new backend library for information about distributions: nir0s/distro. This library runs on Python-3.8 and fixes many bugs, including correcting release and version names. The two facts used in playbooks most often, ansible_distribution and ansible_distribution_major_version, should not change. If you discover a change in these facts, please file a bug so we can address the difference. However, other facts like ansible_distribution_release and ansible_distribution_version may change as erroneous information gets corrected.

Bugfix in WIP status.

This PR solves the error reported by @MarcFinetRtone :

On my debian stretch, the ansible_distribution_version is 9, not 9.0 nor 9.x. Moreover the version() filter returns False leading to set "ssh" instead of expected "sshd".