diff --git a/confluent_osdeploy/common/opt/confluent/bin/apiclient b/confluent_osdeploy/common/opt/confluent/bin/apiclient index 5e8c418a..f9997004 100644 --- a/confluent_osdeploy/common/opt/confluent/bin/apiclient +++ b/confluent_osdeploy/common/opt/confluent/bin/apiclient @@ -66,6 +66,15 @@ class HTTPSClient(client.HTTPConnection, object): ifout.write(ifidx) if json: self.stdheaders['ACCEPT'] = 'application/json' + try: + info = open('/etc/confluent/confluent.deploycfg').read().split('\n') + except Exception: + info = None + if info: + for line in info: + if line.startswith('deploy_server: '): + host = line.split(': ', 1)[1] + break self.stdheaders['CONFLUENT_APIKEY'] = get_apikey(node, host) if mgtiface: self.stdheaders['CONFLUENT_MGTIFACE'] = mgtiface