What was going on
Ansible ssh connections failed with SSH Error: unix_listener: "[HOME]/..." too long for Unix domain socket, typically against hosts with long names such as EC2 public DNS names. The ControlPath socket path exceeded the OS limit for unix socket paths. The error message printed the full socket path, which made the overlong hostname portion obvious.
What fixed it
This was fixed generically in Ansible 2.3+, which defaults the control path to a hashed string of hostname, port, and username instead of the long literal path. If you still see the error on 2.3 or newer, it is because a custom control_path is set in ansible.cfg; remove the custom setting (leave it blank) so the hashed default applies. On older versions the workaround is to shorten the path in ansible.cfg with control_path = %(directory)s/%%h-%%p-%%r under [ssh_connection].