svn commit: r438787 - in head/sysutils/ansible: . files
Nikolai Lifanov
lifanov at FreeBSD.org
Tue Apr 18 17:51:45 UTC 2017
Author: lifanov
Date: Tue Apr 18 17:51:43 2017
New Revision: 438787
URL: https://svnweb.freebsd.org/changeset/ports/438787
Log:
sysutils/ansible: fix prompt for become-method=su
PR: 218724
Reported by: Guillaume Bibaut <yom at iaelu.net>
Added:
head/sysutils/ansible/files/extra-patch-f82d95a (contents, props changed)
Modified:
head/sysutils/ansible/Makefile
Modified: head/sysutils/ansible/Makefile
==============================================================================
--- head/sysutils/ansible/Makefile Tue Apr 18 15:56:03 2017 (r438786)
+++ head/sysutils/ansible/Makefile Tue Apr 18 17:51:43 2017 (r438787)
@@ -3,7 +3,7 @@
PORTNAME= ansible
PORTVERSION?= 2.3.0.0
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= sysutils python
MASTER_SITES= http://releases.ansible.com/ansible/
@@ -19,6 +19,8 @@ RUN_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}yam
${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2 \
${PYTHON_PKGNAMEPREFIX}netaddr>0:net/py-netaddr
+EXTRA_PATCHES?= ${FILESDIR}/extra-patch-f82d95a
+
NO_ARCH= yes
USES?= cpe python
USE_PYTHON= autoplist distutils
Added: head/sysutils/ansible/files/extra-patch-f82d95a
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/ansible/files/extra-patch-f82d95a Tue Apr 18 17:51:43 2017 (r438787)
@@ -0,0 +1,23 @@
+From f82d95ae288cccae8245236e4d7e6188f0a7d389 Mon Sep 17 00:00:00 2001
+From: Matt Martz <matt at sivel.net>
+Date: Tue, 18 Apr 2017 11:34:07 -0500
+Subject: [PATCH] When become_method is su, self._play_context.prompt is a
+ function. Fixes #23689
+
+---
+ lib/ansible/plugins/connection/__init__.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/ansible/plugins/connection/__init__.py b/lib/ansible/plugins/connection/__init__.py
+index 8a94d6e..6ba4aa2 100644
+--- lib/ansible/plugins/connection/__init__.py
++++ lib/ansible/plugins/connection/__init__.py
+@@ -258,6 +258,8 @@ def check_password_prompt(self, b_output):
+ if not b_lines:
+ return False
+ return b_lines[-1].strip().endswith(b_prompt) or b_lines[0].strip().endswith(b_prompt)
++ else:
++ return self._play_context.prompt(b_output)
+
+ def check_incorrect_password(self, b_output):
+ b_incorrect_password = to_bytes(gettext.dgettext(self._play_context.become_method, C.BECOME_ERROR_STRINGS[self._play_context.become_method]))
More information about the svn-ports-head
mailing list