Make sure to keep case when for host definition in host inventory.
Config parser remove capitalization information when it writes the configuration file. Make sure to keep by removing any transformation. Change-Id: I7f46e4b7bdac5110d111537a044473c362d059f6 Closes-Bug: #1712190
This commit is contained in:
parent
8a2022e8a5
commit
ddc025d472
|
@ -74,6 +74,8 @@ def _parse_config():
|
|||
def write_static_inventory(inventory_file_path, inventory):
|
||||
with open(inventory_file_path, 'w') as inventory_file:
|
||||
config = configparser.ConfigParser(allow_no_value=True)
|
||||
# Keep case formating.
|
||||
config.optionxform = str
|
||||
for section_name, section in inventory.items():
|
||||
# NOTE(jaosorior): The section might be a list containing the
|
||||
# explicit list of nodes or a dict with several subsections. So
|
||||
|
|
Loading…
Reference in New Issue