Set raw=True when reading passwords from ConfigParser files.

Cherry-pick of https://github.com/ansible/ansible/pull/35582
This commit is contained in:
Bill Nottingham
2018-04-05 10:32:50 -04:00
parent e47570e323
commit 17f8ec64ce
4 changed files with 4 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ class ForemanInventory(object):
try:
self.foreman_url = config.get('foreman', 'url')
self.foreman_user = config.get('foreman', 'user')
self.foreman_pw = config.get('foreman', 'password')
self.foreman_pw = config.get('foreman', 'password', raw=True)
self.foreman_ssl_verify = config.getboolean('foreman', 'ssl_verify')
except (ConfigParser.NoOptionError, ConfigParser.NoSectionError) as e:
print("Error parsing configuration: %s" % e, file=sys.stderr)