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 }} ...@@ -116,12 +116,12 @@ dhcp-boot=tag:{{br.name}},{{ dnsmasq.pxe.file }},,{{ dnsmasq.pxe.address }}
{% if dnsmasq.aptCacher is defined and dnsmasq.aptCacher %} {% if dnsmasq.aptCacher is defined and dnsmasq.aptCacher %}
# apt cacher # apt cacher
{% if dnsmasq.aptCacher != "localhost" %} {% if dnsmasq.aptCacher == "localhost" or (dnsmasq.aptCacher.localhost is defined and dnsmasq.aptCacher.localhost) %}
## In-built apt cacher ## In-built apt cacher
{{setAptCacher(dnsmasq.aptCacher)}}
{% else %}
## Remote apt cacher
{{setAptCacher(services.address)}} {{setAptCacher(services.address)}}
{% elif %}
## Remote apt cacher
{{setAptCacher(dnsmasq.aptCacher)}}
{% endif %} {% endif %}
{% endif %} {% endif %}
......
...@@ -21,7 +21,7 @@ services: ...@@ -21,7 +21,7 @@ services:
ports: ports:
- '{{services.address}}:1688:1688' - '{{services.address}}:1688:1688'
{% endif %} {% 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: apt-cacher-ng:
restart: always restart: always
image: git-registry.mycard.moe/nanahira/apt-cacher-ng-docker:latest image: git-registry.mycard.moe/nanahira/apt-cacher-ng-docker:latest
...@@ -30,7 +30,7 @@ services: ...@@ -30,7 +30,7 @@ services:
ports: ports:
- '{{services.address}}:80:80' - '{{services.address}}:80:80'
volumes: volumes:
- ./apt-cacher-ng:/var/cache/apt-cacher-ng - {{ dnsmasq.aptCacher.path | default('./apt-cacher-ng') }}:/var/cache/apt-cacher-ng
{% endif %} {% endif %}
{% if dnsmasq.pxe is defined and (dnsmasq.pxe == "localhost" or (dnsmasq.pxe.localhost is defined and dnsmasq.pxe.localhost)) %} {% if dnsmasq.pxe is defined and (dnsmasq.pxe == "localhost" or (dnsmasq.pxe.localhost is defined and dnsmasq.pxe.localhost)) %}
pxe-tftp: 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