-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
ansible provisioner fails with "failed to transfer file" #11783
Comments
I've got the exact same problem on Arch Linux and it's regardless to Ansible version (tried to go back many versions installing Ansible using pip). Since Arch, just like Fedora, has more recent packages, I suspect it has something to do with other components, maybe ssh client.
I worked around the issue for now by using Debian in a Docker container. |
@dklement-unity Thanks! You mean you run packer from the Docker container? |
@dklement-unity yep, it is definitely openssh package. I downgraded to 8.9p1-1 and now it works fine. |
Or you can specify --scp-extra-args '-O' for ansible like this |
Yes, I can confirm, this works for me! Thanks a lot. |
Just tested: packer-1.8.1 does not yet fix this for me |
I think hashicorp/packer-plugin-ansible#100 could be the root cause. |
scp in OpenSSH 9 now uses SFTP by default, which breaks the Packer / Ansible / SSH Proxy interaction See hashicorp/packer-plugin-ansible#100 And hashicorp/packer#11783 Adding the `-O` flag to the `scp` command forces the old protocol to be used.
scp in OpenSSH 9 now uses SFTP by default, which breaks the Packer / Ansible / SSH Proxy interaction See hashicorp/packer-plugin-ansible#100 And hashicorp/packer#11783 Adding the `-O` flag to the `scp` command forces the old protocol to be used.
This issue has been migrated to hashicorp/packer-plugin-ansible#110 due to the Packer Plugin split. Please follow the new issue for updates. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
- Inject environment variables through list instead of using a script. - Already in the .venv context from the makefile, so don't need to activate it again.
Community Note
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
I have a packer config using the virtualbox-iso builder for building Debian VMs.
This config uses the ansible provisioner and worked fine before.
Recently I see failed builds because the provisioning step fails:
Reproduction Steps
Run "packer build" with a packer build using the ansible provisioner.
Packer version
1.8.0
Simplified Packer Template
the part with the provisioner:
These extra_args come from fixing an issue with ssh not able to log into the created VM.
If I comment these vars it fails as well, but with another issue around "host key type" (yes, I found the related issue, that's where my extra_vars come from).
Operating system and Environment details
Fedora 36 Workstation, VirtualBox 6.1.34
The text was updated successfully, but these errors were encountered: