Using packer to copy files needed for build

47 views
Skip to first unread message

Ralphael Johnson

unread,
Feb 10, 2020, 3:45:38 PM2/10/20
to Packer
I have a file on a remote server that I am trying to have copied over during the build process. Its failing to copy the file but it is connecting successfully. Is anyone using scp inside a script to copy a file from a remote server during the packer build?

Gautam Singh

unread,
Feb 10, 2020, 3:57:37 PM2/10/20
to packe...@googlegroups.com
Why not use file provisioner instead.

On Mon, Feb 10, 2020, 2:45 PM Ralphael Johnson <playbo...@gmail.com> wrote:
I have a file on a remote server that I am trying to have copied over during the build process. Its failing to copy the file but it is connecting successfully.  Is anyone using scp inside a script to copy a file from a remote server during the packer build?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/8cec51e4-7578-4ce1-be05-2a6eff92e406%40googlegroups.com.

Rickard von Essen

unread,
Feb 11, 2020, 6:20:35 AM2/11/20
to packe...@googlegroups.com
Scp works as normal from an instance. There is nothing special regarding that when running packer. Build with --on-error=ask, when it fails log into the instance end debug manually before destroying it.

Ralphael Johnson

unread,
Feb 11, 2020, 8:44:05 AM2/11/20
to Packer
File provisioner won't do what I need it to do because as far as I know the files have to be local. The file in question is on a remote system. Can the file provisioner move remote files as well??

Ralphael Johnson

unread,
Feb 11, 2020, 8:44:32 AM2/11/20
to Packer
I'll try this and see what happens, thx 👍

John Roh

unread,
Feb 11, 2020, 4:58:00 PM2/11/20
to packe...@googlegroups.com
I was able to copy from centos7 container image to the remote instance (ec2 windows) fine. 

On Tue, Feb 11, 2020 at 5:44 AM Ralphael Johnson <playbo...@gmail.com> wrote:
I'll try this and see what happens, thx 👍

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages