summaryrefslogtreecommitdiff
path: root/roles/apt-cacher-ng/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/apt-cacher-ng/tasks/main.yml')
-rw-r--r--roles/apt-cacher-ng/tasks/main.yml18
1 files changed, 17 insertions, 1 deletions
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