2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Fix add_local_repositories in v6 environment

This commit is contained in:
Jarrod Johnson 2023-01-06 15:35:36 -05:00
parent 57b6d8677b
commit cc0962f5e5
3 changed files with 36 additions and 3 deletions

View File

@ -7,15 +7,26 @@ import imp
import sys
apiclient = imp.load_source('apiclient', '/opt/confluent/bin/apiclient')
repo = None
server4 = None
server = None
server6 = None
profile = None
v4cfg = None
with open('/etc/confluent/confluent.deploycfg') as dplcfgfile:
lines = dplcfgfile.read().split('\n')
for line in lines:
if line.startswith('deploy_server:'):
_, server = line.split(' ', 1)
_, server4 = line.split(' ', 1)
if line.startswith('deploy_server_v6:'):
_, server6 = line.split(' ', 1)
if line.startswith('profile: '):
_, profile = line.split(' ', 1)
if line.startswith('ipv4_method: '):
_, v4cfg = line.split(' ', 1)
if v4cfg == 'static' or v4cfg =='dhcp':
server = server4
if not server:
server = '[{}]'.format(server6)
path = '/confluent-public/os/{0}/distribution/'.format(profile)
clnt = apiclient.HTTPSClient()

View File

@ -12,14 +12,25 @@ apiclient = importlib.util.module_from_spec(modspec)
modspec.loader.exec_module(apiclient)
repo = None
server = None
v4cfg = None
server4 = None
server6 = None
profile = None
with open('/etc/confluent/confluent.deploycfg') as dplcfgfile:
lines = dplcfgfile.read().split('\n')
for line in lines:
if line.startswith('deploy_server:'):
_, server = line.split(' ', 1)
_, server4 = line.split(' ', 1)
if line.startswith('deploy_server_v6:'):
_, server6 = line.split(' ', 1)
if line.startswith('profile: '):
_, profile = line.split(' ', 1)
if line.startswith('ipv4_method: '):
_, v4cfg = line.split(' ', 1)
if v4cfg == 'static' or v4cfg =='dhcp':
server = server4
if not server:
server = '[{}]'.format(server6)
path = '/confluent-public/os/{0}/distribution/'.format(profile)
clnt = apiclient.HTTPSClient()

View File

@ -12,14 +12,25 @@ apiclient = importlib.util.module_from_spec(modspec)
modspec.loader.exec_module(apiclient)
repo = None
server = None
v4cfg = None
server4 = None
server6 = None
profile = None
with open('/etc/confluent/confluent.deploycfg') as dplcfgfile:
lines = dplcfgfile.read().split('\n')
for line in lines:
if line.startswith('deploy_server:'):
_, server = line.split(' ', 1)
_, server4 = line.split(' ', 1)
if line.startswith('deploy_server_v6:'):
_, server6 = line.split(' ', 1)
if line.startswith('profile: '):
_, profile = line.split(' ', 1)
if line.startswith('ipv4_method: '):
_, v4cfg = line.split(' ', 1)
if v4cfg == 'static' or v4cfg =='dhcp':
server = server4
if not server:
server = '[{}]'.format(server6)
path = '/confluent-public/os/{0}/distribution/'.format(profile)
clnt = apiclient.HTTPSClient()