Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get mirrors from the env #167

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions centos7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ include ../scripts/check.mk

PACKER ?= packer
PACKER_LOG ?= 0

export PACKER_LOG KS_PROXY
KS_MIRROR ?= http://mirrorlist.centos.org
export PACKER_LOG KS_PROXY KS_MIRROR

.PHONY: all clean check-deps

Expand All @@ -17,7 +17,7 @@ centos7.tar.gz: clean check-deps http/centos7.ks
${PACKER} init centos7.pkr.hcl && ${PACKER} build centos7.pkr.hcl

http/centos7.ks: http/centos7.ks.in
envsubst '$${KS_PROXY}' < $< | tee $@
envsubst '$${KS_PROXY} $${KS_MIRROR}' < $< | tee $@

clean:
${RM} -rf output-centos7 centos7.tar.gz http/centos7.ks
Expand Down
6 changes: 3 additions & 3 deletions centos7/http/centos7.ks.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url --mirrorlist="http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os" ${KS_PROXY}
url --mirrorlist="${KS_MIRROR}/?release=7&arch=x86_64&repo=os" ${KS_PROXY}
poweroff
firewall --enabled --service=ssh
firstboot --disable
Expand All @@ -12,8 +12,8 @@ timezone UTC --isUtc
bootloader --location=mbr --driveorder="vda" --timeout=1
rootpw --plaintext password

repo --name="Updates" --mirrorlist="http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates" ${KS_PROXY}
repo --name="Extras" --mirrorlist="http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras" ${KS_PROXY}
repo --name="Updates" --mirrorlist="${KS_MIRROR}/?release=7&arch=x86_64&repo=updates" ${KS_PROXY}
repo --name="Extras" --mirrorlist="${KS_MIRROR}/?release=7&arch=x86_64&repo=extras" ${KS_PROXY}

zerombr
clearpart --all --initlabel
Expand Down
6 changes: 3 additions & 3 deletions centos8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ include ../scripts/check.mk

PACKER ?= packer
PACKER_LOG ?= 0

export PACKER_LOG KS_PROXY
KS_MIRROR ?= http://mirrorlist.centos.org
export PACKER_LOG KS_PROXY KS_MIRROR

.PHONY: all clean

Expand All @@ -17,7 +17,7 @@ centos8.tar.gz: check-deps clean http/centos8.ks
${PACKER} init centos8.pkr.hcl && ${PACKER} build centos8.pkr.hcl

http/centos8.ks: http/centos8.ks.in
envsubst '$${KS_PROXY}' < $< | tee $@
envsubst '$${KS_PROXY} $${KS_MIRROR}' < $< | tee $@

clean:
${RM} -rf output-centos8 centos8.tar.gz http/centos8.ks
Expand Down
6 changes: 3 additions & 3 deletions centos8/http/centos8.ks.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url --mirrorlist="http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=BaseOS" ${KS_PROXY}
url --mirrorlist="${KS_MIRROR}/?release=8&arch=x86_64&repo=BaseOS" ${KS_PROXY}
poweroff
firewall --enabled --service=ssh
firstboot --disable
Expand All @@ -12,8 +12,8 @@ timezone UTC --isUtc
bootloader --location=mbr --driveorder="vda" --timeout=1
rootpw --plaintext password

repo --name="AppStream" --mirrorlist="http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream" ${KS_PROXY}
repo --name="Extras" --mirrorlist="http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=extras" ${KS_PROXY}
repo --name="AppStream" --mirrorlist="${KS_MIRROR}/?release=8&arch=x86_64&repo=AppStream" ${KS_PROXY}
repo --name="Extras" --mirrorlist="${KS_MIRROR}/?release=8&arch=x86_64&repo=extras" ${KS_PROXY}

zerombr
clearpart --all --initlabel
Expand Down