diff --git a/lib/ansible/modules/network/junos/_junos_template.py b/lib/ansible/modules/network/junos/_junos_template.py index c65525d849..c50deeef2c 100644 --- a/lib/ansible/modules/network/junos/_junos_template.py +++ b/lib/ansible/modules/network/junos/_junos_template.py @@ -144,7 +144,7 @@ def main(): "set per junos-pyez documentation") results = dict(changed=False) - results['_backup'] = str(module.config.get_config()).strip() + results['_backup'] = unicode(module.config.get_config()).strip() try: diff = module.config.load_config(src, commit=commit, replace=replace, diff --git a/lib/ansible/modules/network/junos/junos_config.py b/lib/ansible/modules/network/junos/junos_config.py index 3b5fdd1d1b..94d4ff8943 100644 --- a/lib/ansible/modules/network/junos/junos_config.py +++ b/lib/ansible/modules/network/junos/junos_config.py @@ -213,7 +213,7 @@ def config_to_commands(config): return commands def diff_commands(commands, config): - config = [str(c).replace("'", '') for c in config] + config = [unicode(c).replace("'", '') for c in config] updates = list() visited = set()