Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File provisioner with lxd builder acts if trailing slash is present #5

Open
ghost opened this issue Apr 22, 2021 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Apr 22, 2021

This issue was originally opened by @markododa as hashicorp/packer#7530. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Using the lxd builder, i have a simple file provisioner decleration

{ "type": "file", "source": "/root/saltstack/reactor", "destination": "/srv/reactor" },
as per the documentation at https://www.packer.io/docs/provisioners/file.html this should create a folder /srv/reactor with the contents of the source directory.
However /srv/reactor is not created but its contents are in the /srv folder

@rnalrd
Copy link

rnalrd commented Apr 22, 2022

Another problem, probably present due to the same bug, is that if a trailing slash is present, a folder is created anyway, instead of just copying the files.

For example:

{ sources = [ "srcfolder/foo/" ] destination = "dstfolder" }

"dstfolder/foo" is created.

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

No branches or pull requests

2 participants