Improve host-overrides

Add distributed cloud role information in the host overrides.
The restore playbook needs this information.

Partial-Bug: 1870389
Change-Id: I278f19be32d1fe87687feb75e26b2898237de86f
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
This commit is contained in:
Dan Voiculeasa 2020-04-10 11:31:06 +03:00
parent d119336b3a
commit 362d905dad
1 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,13 @@ def create_host_overrides(filename):
dbapi = api.get_instance()
data = {}
# Get the distributed cloud role info
system = dbapi.isystem_get_one()
if system.distributed_cloud_role:
data.update({'distributed_cloud_role': system.distributed_cloud_role})
else:
data.update({'distributed_cloud_role': 'none'})
# Get the DNS info
dns = dbapi.idns_get_one()
if dns.nameservers: