Hi,
I’ve just pushed a PR that implements a new Dockerfile extension in Docker 1.9 - ARG command.
The ansible module docker_image now supports this!
Someone please review, as soon as it’s said ok, I’m going to create another PR for the 2.0 version.