diff options
Diffstat (limited to 'lib/ansible/config/manager.py')
-rw-r--r-- | lib/ansible/config/manager.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ansible/config/manager.py b/lib/ansible/config/manager.py index 858dc4c645..99fc49fd1c 100644 --- a/lib/ansible/config/manager.py +++ b/lib/ansible/config/manager.py @@ -325,7 +325,10 @@ class ConfigManager(object): ftype = get_config_type(cfile) if cfile is not None: if ftype == 'ini': - self._parsers[cfile] = configparser.ConfigParser() + kwargs = {} + if PY3: + kwargs['inline_comment_prefixes'] = (';',) + self._parsers[cfile] = configparser.ConfigParser(**kwargs) with open(to_bytes(cfile), 'rb') as f: try: cfg_text = to_text(f.read(), errors='surrogate_or_strict') |