diff options
Diffstat (limited to 'roles/apt-cacher-ng')
-rw-r--r-- | roles/apt-cacher-ng/defaults/main.yml | 2 | ||||
-rw-r--r-- | roles/apt-cacher-ng/tasks/main.yml | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/roles/apt-cacher-ng/defaults/main.yml b/roles/apt-cacher-ng/defaults/main.yml index eb50d456..e172d7da 100644 --- a/roles/apt-cacher-ng/defaults/main.yml +++ b/roles/apt-cacher-ng/defaults/main.yml @@ -2,6 +2,8 @@ # apt_cacher_ng_storage: # type: ... +# apt_cacher_ng_hostname: apt.example.com + # apt_cacher_ng_remaps: # debrep: # path: /debian diff --git a/roles/apt-cacher-ng/tasks/main.yml b/roles/apt-cacher-ng/tasks/main.yml index eb1620cc..df47ee9e 100644 --- a/roles/apt-cacher-ng/tasks/main.yml +++ b/roles/apt-cacher-ng/tasks/main.yml @@ -56,8 +56,10 @@ copy: content: | # ansible managed - ForceManaged: 1 + BindAddress: 127.0.0.1 + + ForceManaged: 1 {% for name, config in apt_cacher_ng_remaps.items() %} Remap-{{ name }}: {{ config.path }} ; file:backends_{{ name }} {% endfor %} @@ -82,3 +84,17 @@ regexp: '#\s*AdminAuth:' line: "AdminAuth: {{ apt_cacher_ng_admin_auth.username }}:{{ apt_cacher_ng_admin_auth.password }}" notify: restart apt-cacher-ng + +- name: configure nginx vhost + vars: + nginx_vhost: + default: yes + name: apt-cacher-ng + template: generic + hostnames: + - "{{ apt_cacher_ng_hostname }}" + locations: + '/': + proxy_pass: http://127.0.0.1:3142 + include_role: + name: nginx/vhost |