aboutsummaryrefslogtreecommitdiff
path: root/sysutils/ansible
diff options
context:
space:
mode:
authorNikolai Lifanov <lifanov@FreeBSD.org>2017-04-18 17:51:43 +0000
committerNikolai Lifanov <lifanov@FreeBSD.org>2017-04-18 17:51:43 +0000
commit85c2c14f51f03eef7609b1680dd0bc3b98616c01 (patch)
treece218e82af915fa1e72bb319ad9024f929022460 /sysutils/ansible
parent82fe6f03753be0408197b58560cebd409f1e1aa3 (diff)
downloadports-85c2c14f51f03eef7609b1680dd0bc3b98616c01.tar.gz
ports-85c2c14f51f03eef7609b1680dd0bc3b98616c01.zip
Notes
Diffstat (limited to 'sysutils/ansible')
-rw-r--r--sysutils/ansible/Makefile4
-rw-r--r--sysutils/ansible/files/extra-patch-f82d95a23
2 files changed, 26 insertions, 1 deletions
diff --git a/sysutils/ansible/Makefile b/sysutils/ansible/Makefile
index 59d7612da63c..c7371178ae12 100644
--- a/sysutils/ansible/Makefile
+++ b/sysutils/ansible/Makefile
@@ -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}yaml>0:devel/py-yaml \
${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
diff --git a/sysutils/ansible/files/extra-patch-f82d95a b/sysutils/ansible/files/extra-patch-f82d95a
new file mode 100644
index 000000000000..53e239a04974
--- /dev/null
+++ b/sysutils/ansible/files/extra-patch-f82d95a
@@ -0,0 +1,23 @@
+From f82d95ae288cccae8245236e4d7e6188f0a7d389 Mon Sep 17 00:00:00 2001
+From: Matt Martz <matt@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]))