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

[Ubuntu 20.04.1] Problems installing fail2ban

gfunosas opened this issue · comments

Hello,

We are using this security role (version 2.0.1.), in a new server with Ubuntu focal version 20.04.1, and we get this:

TASK [geerlingguy.security : Install fail2ban (Debian).] *******************************************************************************************************
fatal: []: FAILED! => {"changed": false, "msg": "No package matching 'fail2ban' is available"}

We've realized that the problem is that the package is not found on the 20.04.1 version of Ubuntu (apt search fail2ban gives 0 results, whereas in Ubuntu 20.04 it is found).

Is anyone else having this problem, or does anyone already know how to solve it?

Thank you,

I saw the same on Ubuntu 20.04, where fail2ban wouldn't install. I found that it was available after running apt update so I was able to do with with a pre_task:

pre_tasks:
  - apt:
      update_cache: true
      cache_valid_time: 3600
commented

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

commented

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.