Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

using file extension in resource name duplicates file extension. #53

Description

@mmarseglia

Ran into an issue with the following code

 45       $packer_basename = inline_template(
 46         "<%= \"#{@prefix}#{@version}_#{scope['::kernel'].downcase}_#{@arch}.zip\" %>"
 47       )
 48
 49       $packer_url = "${packer::params::base_url}${packer_basename}"
 50
 51       # Download the Packer zip archive to the cache.
 52       archive { $packer_basename :
 53         ensure           => present,
 54         url              => "${packer_url}",
 55         target           => $bin_dir,
 56         follow_redirects => true,
 57         extension        => 'zip',
 58         checksum         => false,
 59         src_target       => $cache_dir,
 60       }

it produced this output, where it appended .zip to the file name.

Notice: /Stage[main]/Packer/Archive[packer_0.7.5_linux_amd64.zip]/Archive::Download[packer_0.7.5_linux_amd64.zip.zip]/Exec[download archive packer_0.7.5_linux_amd64.zip.zip and check sum]/returns: executed successfully
Notice: /Stage[main]/Packer/Archive[packer_0.7.5_linux_amd64.zip]/Archive::Extract[packer_0.7.5_linux_amd64.zip]/Exec[packer_0.7.5_linux_amd64.zip unpack]/returns: executed successfully
Notice: /Stage[main]/Main/Node[xagent.vagrant.vm]/Packer::Plugin[post-processor-vagrant-vmware-ovf]/Archive[packer-post-processor-vagrant-vmware-ovf.linux-amd64]/Archive::Extract[packer-post-processor-vagrant-vmware-ovf.linux-amd64]/Exec[packer-post-processor-vagrant-vmware-ovf.linux-amd64 unpack]/returns: executed successfully

vagrant]# ls /tmp/
packer_0.7.5_linux_amd64.zip.zip

It didn't error but the output was unexpected. Am I missing something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions