No response from Ipify

I’m attempting to provision my staging server with ansible-playbook server.yml -e env=staging but I keep getting this message.

TASK [common : Retrieve SSH client IP] **************************************************************************************

Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/network/
<remote_ip> ESTABLISH LOCAL CONNECTION FOR USER: <local_username>
<remote_ip> EXEC /bin/sh -c '/usr/bin/python && sleep 0'

System info:
  Ansible; Darwin
  Trellis at "Ansible 2.3 compatibility"
No valid or no response from url within 10 seconds
fatal: [<remote_ip>]: FAILED! => {
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": {
            "api_url": "",
            "timeout": 10

I’ve logged into the server via SSH and ran curl, which indeed returns my IP address.

1 Like

Trellis runs the ipify_facts module with connection: local so that it retrieves your local machine’s public IP (not your server’s), which it adds to the ip_whitelist variable used with the ferm firewall rules and fail2ban rules to make sure your machine doesn’t get blocked.

Connection issues like this are usually just temporary, so you could try again later. If you need the failed connection/task to stop blocking right now, you could

    - "{{ (env == 'development') | ternary(ansible_default_ipv4.gateway, ipify_public_ip | default('')) }}"
+   -