From 2cbeca09fc9e2a53b0c1d5881f91d3d22518f16b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Wed, 22 Dec 2021 11:53:14 +0000 Subject: roles/cgit: Enable cache --- roles/cgit/tasks/main.yml | 8 ++++++++ roles/cgit/templates/cgitrc.j2 | 4 ++++ 2 files changed, 12 insertions(+) (limited to 'roles/cgit') diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml index 0f51d0c..4559708 100644 --- a/roles/cgit/tasks/main.yml +++ b/roles/cgit/tasks/main.yml @@ -5,6 +5,14 @@ - lowdown state: present +- name: create cgit cache directory + file: + path: "{{ cgit_chroot_dir }}/cache/cgit" + owner: www + group: www + mode: 0750 + state: directory + - name: generate cgit configuration files template: src: "{{ item.template }}" diff --git a/roles/cgit/templates/cgitrc.j2 b/roles/cgit/templates/cgitrc.j2 index 40b4b07..2b01ef4 100644 --- a/roles/cgit/templates/cgitrc.j2 +++ b/roles/cgit/templates/cgitrc.j2 @@ -6,6 +6,10 @@ logo={{ cgit__logo }} favicon={{ cgit__favicon }} footer={{ cgit__footer }} +# cache +cache-root=/cache/cgit +cache-size=100 + # readme readme=:README.md readme=:README.org -- cgit v1.2.3