Hi. 2.13 broke deployment from FreeBSD control host to Linux target hosts because it now can modify shebangs in modules and expects them to be either unversioned or absent. At least some (if not all) modules in py38-ansible package have versioned python shebangs (modules from ansible-core do not have any), those modules now fail. More info here: https://github.com/ansible/ansible/issues/78243 Breaking change is here: https://github.com/ansible/ansible/issues/78243
Wrong link on breaking change, here https://github.com/ansible/ansible/pull/76677
I have not been able to reproduce this bug
(In reply to May Gatliff from comment #2) Do you by any chance have python on target host by the same path as in modules' tampered shebang?
I can confirm this. Playbooks only works against FreeBSD clients. Centos,Rocky OpenSuse all fails. Rolling back on the controller to py39-ansible-core-2.12.7 fixes this, as well as the described fix in https://github.com/ansible/ansible/issues/78243 to set environment variable: ansible_python3.9_interpreter: /usr/bin/python3.9 The ansible controller assumes /usr/local/bin/python3.9 on all platforms.
Tried replacing SHEBANG_GLOB with: SHEBANG_REGEX= (([^/])|(/[^m])|(/m[^o])|(/mo[^d])|(/mod[^u])|(/modu[^l])|(/modul[^e])|(/module[^s])|(/modules[^/]))*\.(py|sh|build.py.generic) (excluding anything with /modules/ in path) (not having negative lookahead is a pain). Seems to be working.
Thanks a lot for the report. I'm testing the SHEBANG_REGEX now.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a6edc54ae6911d8d7621182c2c2ffa26777985ea commit a6edc54ae6911d8d7621182c2c2ffa26777985ea Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-07-21 23:38:56 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-07-21 23:45:15 +0000 sysutils/ansible: Do not replace shebangs within modules It turns out that Ansible does not like when we replace the shebang lines with a path to a Python interpreter with a trailing number (like "python3.9"). Stop replacing the shebang lines in modules directories. If it turns out to be problematic as well, we may consider introducing an indirect symlink to the versioned Python interpreter from a path like /usr/local/libexec/ansible/bin/python for example. PR: 265211 Reported by: vladimir-csp@yandex.ru sysutils/ansible/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Thanks for the SHEBANG_REGEX suggestion. Please let me know if the problem persist after the update.