summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-01-25 14:13:10 -0500
committerGitHub <noreply@github.com>2017-01-25 14:13:10 -0500
commit23524879781958ebdc69f4c68d2429db5544f8ee (patch)
treec136c7bb6ae542820b33bbd1a35e919fb03e084b
parentcda1a638e7844231a699336b725fab75aa32c51f (diff)
parentd3465ee99510302186c4b637b6819137a0cc38f3 (diff)
downloadopenshift-23524879781958ebdc69f4c68d2429db5544f8ee.tar.gz
openshift-23524879781958ebdc69f4c68d2429db5544f8ee.tar.bz2
openshift-23524879781958ebdc69f4c68d2429db5544f8ee.tar.xz
openshift-23524879781958ebdc69f4c68d2429db5544f8ee.zip
Merge pull request #3156 from abutcher/ansible-unsafe-text
Fix yaml representer error seen with ansible-2.2.1.0
-rw-r--r--filter_plugins/openshift_master.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/filter_plugins/openshift_master.py b/filter_plugins/openshift_master.py
index f71d9b863..f209d6c3b 100644
--- a/filter_plugins/openshift_master.py
+++ b/filter_plugins/openshift_master.py
@@ -10,6 +10,7 @@ import sys
from distutils.version import LooseVersion # pylint: disable=no-name-in-module,import-error
from ansible import errors
+from ansible.parsing.yaml.dumper import AnsibleDumper
from ansible.plugins.filter.core import to_bool as ansible_bool
from six import string_types
@@ -485,7 +486,10 @@ class FilterModule(object):
idp_list.append(idp_inst)
IdentityProviderBase.validate_idp_list(idp_list, openshift_version, deployment_type)
- return yaml.safe_dump([idp.to_dict() for idp in idp_list], default_flow_style=False)
+ return yaml.dump([idp.to_dict() for idp in idp_list],
+ allow_unicode=True,
+ default_flow_style=False,
+ Dumper=AnsibleDumper)
@staticmethod
def validate_pcs_cluster(data, masters=None):