diff --git a/lib/ansible/utils/encrypt.py b/lib/ansible/utils/encrypt.py index 1ef6e29c48d..c88387050df 100644 --- a/lib/ansible/utils/encrypt.py +++ b/lib/ansible/utils/encrypt.py @@ -67,7 +67,7 @@ except ImportError: from ansible import constants as C from ansible.errors import AnsibleError -from ansible.module_utils._text import to_text +from ansible.module_utils._text import to_text, to_native __all__ = ['do_encrypt'] @@ -84,6 +84,8 @@ def do_encrypt(result, encrypt, salt_size=None, salt=None): if salt_size: result = crypt.encrypt(result, salt_size=salt_size) elif salt: + if not crypt._salt_is_bytes: + salt = to_native(salt) result = crypt.encrypt(result, salt=salt) else: result = crypt.encrypt(result) diff --git a/test/utils/shippable/python3-test-tag-blacklist.txt b/test/utils/shippable/python3-test-tag-blacklist.txt index e749c6bb286..f4874eaafef 100644 --- a/test/utils/shippable/python3-test-tag-blacklist.txt +++ b/test/utils/shippable/python3-test-tag-blacklist.txt @@ -1,7 +1,6 @@ test_filters test_git test_hg -test_lookups test_pip test_service test_uri