From owner-svn-ports-head@freebsd.org Tue Apr 18 17:51:45 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CA3ED44032; Tue, 18 Apr 2017 17:51:45 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 138071F2F; Tue, 18 Apr 2017 17:51:45 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3IHpi27018206; Tue, 18 Apr 2017 17:51:44 GMT (envelope-from lifanov@FreeBSD.org) Received: (from lifanov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3IHpiGI018204; Tue, 18 Apr 2017 17:51:44 GMT (envelope-from lifanov@FreeBSD.org) Message-Id: <201704181751.v3IHpiGI018204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lifanov set sender to lifanov@FreeBSD.org using -f From: Nikolai Lifanov Date: Tue, 18 Apr 2017 17:51:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r438787 - in head/sysutils/ansible: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 17:51:45 -0000 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 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 +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]))