Commit 24632559 authored by nanahira's avatar nanahira

support localhost cacher

parent 609b4707
......@@ -116,12 +116,12 @@ dhcp-boot=tag:{{br.name}},{{ dnsmasq.pxe.file }},,{{ dnsmasq.pxe.address }}
{% if dnsmasq.aptCacher is defined and dnsmasq.aptCacher %}
# apt cacher
{% if dnsmasq.aptCacher != "localhost" %}
{% if dnsmasq.aptCacher == "localhost" or (dnsmasq.aptCacher.localhost is defined and dnsmasq.aptCacher.localhost) %}
## In-built apt cacher
{{setAptCacher(dnsmasq.aptCacher)}}
{% else %}
## Remote apt cacher
{{setAptCacher(services.address)}}
{% elif %}
## Remote apt cacher
{{setAptCacher(dnsmasq.aptCacher)}}
{% endif %}
{% endif %}
......
......@@ -21,7 +21,7 @@ services:
ports:
- '{{services.address}}:1688:1688'
{% endif %}
{% if dnsmasq.aptCacher is defined and dnsmasq.aptCacher == "localhost" %}
{% if dnsmasq.aptCacher is defined and (dnsmasq.aptCacher == "localhost" or (dnsmasq.aptCacher.localhost is defined and dnsmasq.aptCacher.localhost) %}
apt-cacher-ng:
restart: always
image: git-registry.mycard.moe/nanahira/apt-cacher-ng-docker:latest
......@@ -30,7 +30,7 @@ services:
ports:
- '{{services.address}}:80:80'
volumes:
- ./apt-cacher-ng:/var/cache/apt-cacher-ng
- {{ dnsmasq.aptCacher.path | default('./apt-cacher-ng') }}:/var/cache/apt-cacher-ng
{% endif %}
{% if dnsmasq.pxe is defined and (dnsmasq.pxe == "localhost" or (dnsmasq.pxe.localhost is defined and dnsmasq.pxe.localhost)) %}
pxe-tftp:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment