Browse Source

Merge pull request #16 from saltstack-formulas/local-mirrors

no proxy for local mirrors
tags/v0.5.0
Niels Abspoel 6 years ago
parent
commit
c6efca4439
No account linked to committer's email address
3 changed files with 10 additions and 0 deletions
  1. +3
    -0
      apt-cacher/ng/files/client.conf
  2. +1
    -0
      apt-cacher/ng/map.jinja
  3. +6
    -0
      pillar.example

+ 3
- 0
apt-cacher/ng/files/client.conf View File

{% from "apt-cacher/ng/map.jinja" import apt_cacher_ng with context -%} {% from "apt-cacher/ng/map.jinja" import apt_cacher_ng with context -%}
Acquire::http::Proxy "http://{{ apt_cacher_ng.server_address }}:{{ apt_cacher_ng.server_port }}"; Acquire::http::Proxy "http://{{ apt_cacher_ng.server_address }}:{{ apt_cacher_ng.server_port }}";
Acquire::https::Proxy "{{ apt_cacher_ng.https_proxy }}"; Acquire::https::Proxy "{{ apt_cacher_ng.https_proxy }}";
{% for host in apt_cacher_ng.local_mirrors -%}
Acquire::http::Proxy::{{ host }} "DIRECT";
{% endfor -%}

+ 1
- 0
apt-cacher/ng/map.jinja View File

'credentials': '/etc/apt-cacher-ng/security.conf', 'credentials': '/etc/apt-cacher-ng/security.conf',
'client_config': '/etc/apt/apt.conf.d/80proxy', 'client_config': '/etc/apt/apt.conf.d/80proxy',
'https_proxy': 'DIRECT', 'https_proxy': 'DIRECT',
'local_mirrors': [],
}, },
}, merge=salt['pillar.get']('apt_cacher_ng')) %} }, merge=salt['pillar.get']('apt_cacher_ng')) %}

+ 6
- 0
pillar.example View File

# Default value ignores proxy for HTTPS connections # Default value ignores proxy for HTTPS connections
https_proxy: DIRECT https_proxy: DIRECT


# Local mirrors don't need a proxy
# See https://linux.die.net/man/5/apt.conf
local_mirrors:
- 192.168.0.1
- host.example.test



## ##
# require/require_in/include example # require/require_in/include example

Loading…
Cancel
Save