diff -r 000000000000 -r df042396074e roles/apt-cacher/server/tasks/main.yaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roles/apt-cacher/server/tasks/main.yaml Sun Feb 09 11:58:21 2020 -0600 @@ -0,0 +1,17 @@ +--- + +- name: install apt packages + become: yes + apt: name="apt-cacher-ng" + +- name: configure apt-cacher dirs + become: yes + lineinfile: + path: "/etc/apt-cacher-ng/acng.conf" + regexp: "^{{item.key}}:" + insertafter: "^# {{item.key}}:" + line: "{{item.key}}: {{item.val}}" + with_items: + - { key: "CacheDir", val: "{{apt_cacher_cache_dir}}" } + - { key: "LogDir", val: "{{apt_cacher_log_dir}}" } + - { key: "Port", val: "{{apt_cacher_port}}" }