From 8b06e31e267082749560c9910c1c796e5c379276 Mon Sep 17 00:00:00 2001
From: Rafael Guterres Jeffman <rjeffman@redhat.com>
Date: Sat, 22 Aug 2020 21:13:04 -0300
Subject: [PATCH] Fix ipavault vault_type under Python 2.7.

When running module ipavault with Python 2.7, due to differences in
the handling of unicode string than in Python 3, the vault_type type
was different than the required.

This patch changes the default value to force a unicode string in
the supported versions of Python, fixing the module when Python 2
is used.
---
 plugins/modules/ipavault.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/modules/ipavault.py b/plugins/modules/ipavault.py
index 8060976c..78ca8a54 100644
--- a/plugins/modules/ipavault.py
+++ b/plugins/modules/ipavault.py
@@ -756,7 +756,7 @@ def main():
                     res_vault_type = res_find.get('ipavaulttype')[0]
                     args['ipavaulttype'] = vault_type = res_vault_type
                 else:
-                    args['ipavaulttype'] = vault_type = "symmetric"
+                    args['ipavaulttype'] = vault_type = u"symmetric"
 
             # Create command
             if state == "present":
-- 
GitLab