Summary: | sysutils/ansible 2.4.0.0 is broken | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | gwright | ||||
Component: | Individual Port(s) | Assignee: | Nikolai Lifanov <lifanov> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Many People | Keywords: | regression | ||||
Priority: | Normal | Flags: | bugzilla:
maintainer-feedback?
(lifanov) |
||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
gwright
2017-09-24 16:28:08 UTC
Thank you for the report and the background. I'm going to take a look at it in a few hours. Bumped the importance to 'affects some people'. I suspect I'm not the only one seeing this. Created attachment 186710 [details]
Proposed patch
Added proposed patch. The patch simply drops the line which invoked sed to change the python path from "/usr/bin/python" to "/usr/local/bin/python2.7". This change restores the pre-2.4.0.0 behavior.
It is important to understand that in ansible, python scripts are executed in two places: on the "local" machine (the one doing the configuring) and on the "remote" machine (the one being configured). The "ansible_python_interpreter" variable is substituted for the default "/usr/bin/python" path when a script is copied to the remote machine. However, if the default path is changed (as it is in the 2.4.0.0_1 Makefile), the sed command that adjusts the remote python path fails. Then invocation of the ansible module fails since a python interpreter is not found on the remote.
I have tested this patch with a quite complicated vagrant/ansible configuration and it appears to fix things. The configuration completed normally. Previously, ansible failed during the initial 'gathering facts' operation.
I should add that in the test I referred to in comment #3, I was configuring a linux remote from a freebsd local machine. The path problem may not show up when configuring a freebsd remote from a freebsd local, since the freebsd remote will typically have python at /usr/local/bin/python2.7. This is the same case I was running when I originally saw the bug. I'm still working on a fix, but it's more complicated this time. The proposed patch by itself is not sufficient, but does part of the right thing. With this change, it works now: https://reviews.freebsd.org/D12497 A commit references this bug: Author: lifanov Date: Mon Sep 25 22:49:41 UTC 2017 New revision: 450639 URL: https://svnweb.freebsd.org/changeset/ports/450639 Log: fix setting value for ansible_python_interpreter Thanks to mat for fixing qa.sh for this! PR: 222561 Submitted by: gwright@antiope.com Reported by: gwright@antiope.com, Alex Mur (private email) Changes: head/sysutils/ansible/Makefile Committed, thanks! |