There is no need to require thirsty mode when the destination is a directory. We add the basename of the url to the destination directory and proceed with that. If that file exists in non-thirsty mode continue as expected.
I also cleaned up some of the logic that is no longer necessary if we simply rewrite the destination from the very start the way it is expected.
The check for the destination being a directory is now done before
checking if the file exists, that way the user is informed that the
thirsty argument is required.
whether to download it every time or not -- will replace only on change, or decide to not download. The default
is thirsty=no which will not download every time by default.
operations in the correct order, so the file module results overlay the original module results, not the other way
around (which keeps any failure msg's intact)
get module (with new module-magic-code!)
Usage: ansible -m get -a "url=http://xxxxxxx dest=fileordirctory"
all cleanups as per @mpdehaan's suggestions
add daisychain
added example playbook (get_url.yml) with URLencode example