You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
We are running packer from a pre-built Docker image based on python:3. This started to break since the release of python:3.15 image (at the time of writing), with the following errors:
"failed preparing provisioner-block "ansible""
Reproduction Steps
Docker pull python:3 (or python 3.15)
Install ansible and other tools using pip
Attempt to run packer with ansible provisioning block
I would like to work on this. I will track down what the python 3.15 image changes for the ansible provisioner's preparation step and make that step tolerant of it.
Reproduced with the python:3.14 and python:3.15 images, same ansible 14.5.0 / ansible-core 2.21.5 from pip. On 3.14 ansible-playbook --version prints the normal banner; on 3.15 every ansible command exits 1 before printing anything, with AttributeError: module 'dataclasses' has no attribute '_is_type' (CPython 3.15 removed that private helper). That is ansible/ansible#87677: Python 3.15 support starts with ansible-core 2.22, not backported to 2.21. So the workaround is python:3.14 (or ansible-core 2.22 once released); the provisioner itself only runs ansible-playbook --version.
What the plugin did wrong is to drop ansible's stderr and show only "exit status 1". hashicorp/packer-plugin-ansible#277 appends the captured stderr to that error so the traceback shows up in the Packer diagnostic.
Activity
blacksoxx commentedon Oct 22, 2026
I would like to work on this. I will track down what the python 3.15 image changes for the ansible provisioner's preparation step and make that step tolerant of it.
blacksoxx commentedon Oct 22, 2026
Reproduced with the python:3.14 and python:3.15 images, same ansible 14.5.0 / ansible-core 2.21.5 from pip. On 3.14
ansible-playbook --versionprints the normal banner; on 3.15 every ansible command exits 1 before printing anything, withAttributeError: module 'dataclasses' has no attribute '_is_type'(CPython 3.15 removed that private helper). That is ansible/ansible#87677: Python 3.15 support starts with ansible-core 2.22, not backported to 2.21. So the workaround ispython:3.14(or ansible-core 2.22 once released); the provisioner itself only runsansible-playbook --version.What the plugin did wrong is to drop ansible's stderr and show only "exit status 1". hashicorp/packer-plugin-ansible#277 appends the captured stderr to that error so the traceback shows up in the Packer diagnostic.