ansible / mazer

Experimental Ansible Galaxy Content Manager
GNU General Public License v3.0
114 stars 18 forks source link

For download tmp files, include 'real' artifact name in tmp name #279

Closed alikins closed 5 years ago

alikins commented 5 years ago

Let download.fetch_url() be passed a filename. galaxy_url fetcher will pass it a filename based the 'artifact' section of the collectionDetail.

In that case, the tmp file name used for the collection artifact download will end with the 'real' filename.

It will be in the format:

$TMPDIR/ns-n-1.2.3.tar.gz::$RANDOM-tmp-mazer-artifact-download

If there is no expected filename, it will be:

$TMPDIR/UNKNOWN-UNKNOWN-UNKNOWN.tar.gz::$RANDOM-tmp-mazer-artifact-download

Make it a little easier to clean up if something goes wrong.

ISSUE TYPE
MAZER VERSION
name = mazer
version = 1.0.0
config_file = /home/adrian/.ansible/mazer.yml
uname = Linux, newswoop, 5.0.5-200.fc29.x86_64, #1 SMP Wed Mar 27 20:58:04 UTC 2019, x86_64
executable_location = /home/adrian/venvs/mazer_0.4.0_py36/bin/mazer
python_version = 3.6.8 (default, Jan 27 2019, 09:00:23) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)]
python_executable = /home/adrian/venvs/mazer_0.4.0_py36/bin/python
ADDITIONAL INFORMATION