Ansible fails at "ensure fail2ban is configured"

Hi, folks. Really pulling my hair out on this one.

Just trying to get a development environment up on my Mac (running Sierra, 10.12.3) and ansible can’t seem to make it through the playbook without failing. Specifically, I’m getting this error at the step TASK [fail2ban : ensure fail2ban is configured]:

AnsibleError: 127.0.0.1/8 {{ ip_whitelist | join(' ') }}: [u"{{
lookup('pipe', 'curl -4 -s https://api.ipify.org') }}"]: An unhandled
exception occurred while running the lookup plugin 'pipe'. Error was a <class
'ansible.errors.AnsibleError'>, original message: lookup_plugin.pipe(curl -4
-s https://api.ipify.org) returned 51
failed: [default] (item=jail.local) => {"failed": true, "item": "jail.local"}

I’ve found topics regarding similar issues with fail2ban, but nothing quite like what I’m running into. Any advice is much appreciated.

Instead of being a problem with fail2ban per se, it’s probably a temporary connection problem with the ip_whitelist lookup. I’d suggest trying again now that some time has passed.

Otherwise, of the various threads on the topic, here are a couple that should help: