From 10def3aa54cd6aaed88b858f281da57713043488 Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Thu, 30 Jul 2015 22:42:21 +0530 Subject: [PATCH 1/3] Uncomment encrypt handling for vars_prompt --- lib/ansible/executor/playbook_executor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py index ac7103d540..7f015692ae 100644 --- a/lib/ansible/executor/playbook_executor.py +++ b/lib/ansible/executor/playbook_executor.py @@ -33,6 +33,7 @@ from ansible.template import Templar from ansible.utils.color import colorize, hostcolor from ansible.utils.debug import debug +from ansible.utils.encrypt import do_encrypt class PlaybookExecutor: @@ -269,9 +270,8 @@ class PlaybookExecutor: if not result and default is not None: result = default - # FIXME: make this work with vault or whatever this old method was - #if encrypt: - # result = utils.do_encrypt(result, encrypt, salt_size, salt) + if encrypt: + result = do_encrypt(result, encrypt, salt_size, salt) # handle utf-8 chars # FIXME: make this work From ff2d160fff7aeca1c140eed1951a2954172a0da0 Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Thu, 30 Jul 2015 22:52:47 +0530 Subject: [PATCH 2/3] Correct invalid reference to global display --- lib/ansible/executor/playbook_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py index 7f015692ae..8c654e67f3 100644 --- a/lib/ansible/executor/playbook_executor.py +++ b/lib/ansible/executor/playbook_executor.py @@ -262,7 +262,7 @@ class PlaybookExecutor: second = do_prompt("confirm " + msg, private) if result == second: break - display("***** VALUES ENTERED DO NOT MATCH ****") + self._display.display("***** VALUES ENTERED DO NOT MATCH ****") else: result = do_prompt(msg, private) From 1541e331c99c712f2a97963478acf0a2b7de42a8 Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Thu, 30 Jul 2015 23:27:39 +0530 Subject: [PATCH 3/3] Also fix UTF-8 handling in vars_prompt --- lib/ansible/executor/playbook_executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py index 8c654e67f3..686da5c321 100644 --- a/lib/ansible/executor/playbook_executor.py +++ b/lib/ansible/executor/playbook_executor.py @@ -34,6 +34,7 @@ from ansible.template import Templar from ansible.utils.color import colorize, hostcolor from ansible.utils.debug import debug from ansible.utils.encrypt import do_encrypt +from ansible.utils.unicode import to_unicode class PlaybookExecutor: @@ -274,8 +275,7 @@ class PlaybookExecutor: result = do_encrypt(result, encrypt, salt_size, salt) # handle utf-8 chars - # FIXME: make this work - #result = to_unicode(result, errors='strict') + result = to_unicode(result, errors='strict') return result