diff --git a/lib/ansible/plugins/__init__.py b/lib/ansible/plugins/__init__.py index 85e5c2c2a3..0a2a0b1474 100644 --- a/lib/ansible/plugins/__init__.py +++ b/lib/ansible/plugins/__init__.py @@ -317,7 +317,7 @@ class PluginLoader: return sys.modules[name] with warnings.catch_warnings(): warnings.simplefilter("ignore", RuntimeWarning) - with open(path, 'r') as module_file: + with open(path, 'rb') as module_file: module = imp.load_source(name, path, module_file) return module