From fdb44fc2c4f559d6e398d3172ab034672e796363 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Mon, 25 Mar 2019 19:52:40 +0100
Subject: [PATCH] ipaclient_get_otp: Fix password encoding

Deploying a client with one-time password use was failing in latest tests
using ansible 2.7 and FreeIPA 4.7 because of an encoding problem.
---
 roles/ipaclient/action_plugins/ipaclient_get_otp.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/ipaclient/action_plugins/ipaclient_get_otp.py b/roles/ipaclient/action_plugins/ipaclient_get_otp.py
index 2a85e727..83d5eeeb 100644
--- a/roles/ipaclient/action_plugins/ipaclient_get_otp.py
+++ b/roles/ipaclient/action_plugins/ipaclient_get_otp.py
@@ -62,7 +62,7 @@ def kinit_password(principal, password, ccache_name, config):
     os.environ['KRB5_CONFIG'] = config
 
     try:
-        result = run_cmd(args, stdin=password)
+        result = run_cmd(args, stdin=password.encode())
         return result
     finally:
         if old_config is not None:
-- 
GitLab