Skip to content

Commit

Permalink
Ensure settings for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
to-bar committed Jul 21, 2020
1 parent c767872 commit f529303
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/epicli/cli/engine/ansible/AnsibleInventoryUpgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ def upgrade(self):
manifest_docs = load_yamls_file(path_to_manifest)
self.shared_config = select_single(manifest_docs, lambda x: x.kind == 'configuration/shared-config')

# Ensure settings for backward compatibility
compatibility_settings = {
'vault_location': '', # for Epiphany v0.4
'use_ha_control_plane': False, # for Epiphany v0.5
'promote_to_ha': False # for Epiphany v0.5
}
for key, value in compatibility_settings.items():
if key not in self.shared_config.specification:
self.shared_config.specification[key] = value

if build_version == BUILD_LEGACY:
self.logger.info(f'Upgrading Ansible inventory Epiphany < 0.3.0')

Expand Down

0 comments on commit f529303

Please sign in to comment.