diff --git a/files/cgitrc b/files/cgitrc new file mode 100644 index 0000000..c2352af --- /dev/null +++ b/files/cgitrc @@ -0,0 +1,82 @@ +# cgit config +# see cgitrc(5) for details + +#about-filter=none +#agefile=info/web/last-modified +#auth-filter=none +#branch-sort=name +#cache-about-ttl=15 +#cache-dynamic-ttl=5 +#cache-repo-ttl=5 +#cache-root=/var/cache/cgit +#cache-root-ttl=5 +#cache-scanrc-ttl=15 +#cache-size=0 +#cache-snapshot-ttl=5 +#cache-static-ttl=-1 +case-sensitive-sort=0 +#clone-prefix=none +clone-url=https://git.crypto-libertarian.com/$CGIT_REPO_URL git@git.crypto-libertarian.com:$CGIT_REPO_URL +#commit-filter=none +#commit-sort=unset +css=/cgit-css/cgit.css +#email-filter=none +#embedded=none +enable-blame=1 +enable-commit-graph=1 +#enable-filter-overrides=none +enable-follow-links=1 +#enable-git-config=0 +enable-html-serving=1 +enable-http-clone=0 +enable-index-links=1 +#enable-index-owner=1 +enable-log-filecount=1 +enable-log-linecount=1 +enable-remote-branches=1 +enable-subject-links=1 +#enable-tree-linenumbers=1 +#favicon=/favicon.ico +#footer=none +#head-include=none +#header=none +#local-time=0 +logo=/cgit-css/cgit.png +#logo-link=none +#max-atom-items=10 +#max-blob-size=0 +#max-commit-count=50 +#max-message-length=80 +#max-repo-count=50 +#max-repodesc-length=80 +max-stats=year +#mimetype-file= +#module-link=none +#noheader=none +noplainemail=1 +#owner-filter=none +readme=README.md +remove-suffix=1 +#renamelimit=-1 +#repository-sort=name +#robots=index, nofollow +#root-desc=a fast webinterface for the git dscm +#root-readme=none +#root-title=Git Repository Browser +#scan-hidden-path=0 +#section-sort=1 +#section-from-path=0 +side-by-side-diffs=1 +snapshots=all +#source-filter=none +#strict-export= +#summary-branches=10 +#summary-log=10 +#summary-tags=10 +#virtual-root=none + +#section=none + +#project-list=none + +scan-path=/var/lib/git diff --git a/playbooks/deploy/git.yml b/playbooks/deploy/git.yml index 7400e91..c77f1c0 100644 --- a/playbooks/deploy/git.yml +++ b/playbooks/deploy/git.yml @@ -11,3 +11,17 @@ - name: Install system packages apt: name: cgit + - name: Create directory for git repositories + file: + state: directory + path: /var/lib/git + owner: root + group: root + mode: 'u=rwx,g=rwx,o=rx' + - name: Install cgit configuration + copy: + src: ../../files/cgitrc + dest: /etc/cgitrc + owner: root + group: root + mode: 'u=rw,g=r,o=r'