blob: a8b9d90c68c6a6ecf2c25ce244c66b59bec2922a [file] [log] [blame]
Zack Williams961d3692016-05-01 09:24:30 -07001---
2# roles/apt-cacher-ng/tasks
3
4- name: Install apt-cacher-ng with apt
5 apt:
6 name={{ item }}
7 update_cache=yes
8 cache_valid_time=3600
9 with_items:
10 - apt-cacher-ng
11
12- name: Configure apt-cacher-ng to pass through ssl repos
13 when: apt_ssl_sites is defined
14 lineinfile:
15 'dest=/etc/apt-cacher-ng/acng.conf
16 insertafter="^# PassThroughPattern"
17 regexp="^PassThroughPattern"
18 line="PassThroughPattern: ({{ apt_ssl_sites | join(\"|\")}}):443$"'
19 notify:
20 restart apt-cacher-ng
21
22- name: Configure local system to use apt-cacher-ng
23 template:
24 src=02apt-cacher-ng.j2
25 dest=/etc/apt/apt.conf.d/02apt-cacher-ng
26 mode=0644 owner=root group=root
27