Add support for customized mirror and apt-cacher
This commit is contained in:
@ -67,7 +67,7 @@ def add_preseed(config, cspec_node, host_macaddr, system_drive_target):
|
||||
# We use the dhcp_address here to allow the listen_address to be 0.0.0.0
|
||||
rendered = template.render(
|
||||
debrelease=cspec_node.get("config", {}).get("release"),
|
||||
debmirror=cspec_node.get("config", {}).get("mirror"),
|
||||
debmirror=config.get("repo_mirror"),
|
||||
addpkglist=add_packages,
|
||||
filesystem=cspec_node.get("config", {}).get("filesystem"),
|
||||
skip_blockcheck=False,
|
||||
|
@ -28,7 +28,7 @@ import pvcbootstrapd.lib.notifications as notifications
|
||||
|
||||
def build_tftp_repository(config):
|
||||
# Generate an installer config
|
||||
build_cmd = [ f"{config['ansible_path']}/pvc-installer/buildpxe.sh", "-o", config['tftp_root_path'], "-u", config['deploy_username'] ]
|
||||
build_cmd = [ f"{config['ansible_path']}/pvc-installer/buildpxe.sh", "-o", config['tftp_root_path'], "-u", config['deploy_username'], "-m", config["repo_mirror"] ]
|
||||
print(f"Building TFTP contents via pvc-installer command: {' '.join(build_cmd)}")
|
||||
notifications.send_webhook(config, "begin", f"Building TFTP contents via pvc-installer command: {' '.join(build_cmd)}")
|
||||
retcode = run(build_cmd)
|
||||
|
Reference in New Issue
Block a user