mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #11803 from amenonsen/prompt_encrypt
Uncomment encrypt handling for vars_prompt
This commit is contained in:
commit
d05c4b82aa
1 changed files with 6 additions and 6 deletions
|
@ -33,6 +33,8 @@ from ansible.template import Templar
|
||||||
|
|
||||||
from ansible.utils.color import colorize, hostcolor
|
from ansible.utils.color import colorize, hostcolor
|
||||||
from ansible.utils.debug import debug
|
from ansible.utils.debug import debug
|
||||||
|
from ansible.utils.encrypt import do_encrypt
|
||||||
|
from ansible.utils.unicode import to_unicode
|
||||||
|
|
||||||
class PlaybookExecutor:
|
class PlaybookExecutor:
|
||||||
|
|
||||||
|
@ -261,7 +263,7 @@ class PlaybookExecutor:
|
||||||
second = do_prompt("confirm " + msg, private)
|
second = do_prompt("confirm " + msg, private)
|
||||||
if result == second:
|
if result == second:
|
||||||
break
|
break
|
||||||
display("***** VALUES ENTERED DO NOT MATCH ****")
|
self._display.display("***** VALUES ENTERED DO NOT MATCH ****")
|
||||||
else:
|
else:
|
||||||
result = do_prompt(msg, private)
|
result = do_prompt(msg, private)
|
||||||
|
|
||||||
|
@ -269,13 +271,11 @@ class PlaybookExecutor:
|
||||||
if not result and default is not None:
|
if not result and default is not None:
|
||||||
result = default
|
result = default
|
||||||
|
|
||||||
# FIXME: make this work with vault or whatever this old method was
|
if encrypt:
|
||||||
#if encrypt:
|
result = do_encrypt(result, encrypt, salt_size, salt)
|
||||||
# result = utils.do_encrypt(result, encrypt, salt_size, salt)
|
|
||||||
|
|
||||||
# handle utf-8 chars
|
# handle utf-8 chars
|
||||||
# FIXME: make this work
|
result = to_unicode(result, errors='strict')
|
||||||
#result = to_unicode(result, errors='strict')
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue