IPv6 only hosts fail

Created by: cinderblock

Currently this script fails for IPv6 only hosts. Any thoughts on getting around this?

The first error is "gpg: keyserver receive failed: no keyserver available", caused by:

gpg --keyid-format long --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x871920D1991BC93C

keyserver.ubuntu.com does not have an IPv6 address. Got a workaround?