summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/apache/dev-private-git.linaro.org.conf6
-rw-r--r--roles/cgit/tasks/main.yml34
-rw-r--r--roles/cgit/templates/cgitrc2
3 files changed, 19 insertions, 23 deletions
diff --git a/files/apache/dev-private-git.linaro.org.conf b/files/apache/dev-private-git.linaro.org.conf
index 85e1f986..8334226b 100644
--- a/files/apache/dev-private-git.linaro.org.conf
+++ b/files/apache/dev-private-git.linaro.org.conf
@@ -34,9 +34,9 @@ LDAPOpCacheTTL 36000
!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:\
CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA"
- SSLCertificateFile /etc/ssl/certs/wildcard.git.linaro.org.crt
- SSLCertificateKeyFile /etc/ssl/private/wildcard.git.linaro.org.key
- SSLCACertificateFile /etc/ssl/certs/gd_bundle-g2-g1.pem
+ SSLCertificateFile {{ssl_cert}}
+ SSLCertificateKeyFile {{ssl_key}}
+ SSLCACertificateFile {{ssl_ca}}
</VirtualHost>
<VirtualHost *:443>
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml
index 49deb231..50086936 100644
--- a/roles/cgit/tasks/main.yml
+++ b/roles/cgit/tasks/main.yml
@@ -8,26 +8,25 @@
- name: Install cgitrc file
template: src=cgitrc dest=/etc/cgitrc
-- name: Install cgit dependencies
- apt: name={{ item }}
+- name: Add OBS apt key
+ apt_key:
+ url: http://obs.linaro.org/STG/{{ansible_distribution_release}}/Release.key
+ state: present
+
+- name: Add OBS overlay repository
+ apt_repository:
+ repo: deb http://obs.linaro.org/STG/{{ansible_distribution_release}}/ ./
+ state: present
+
+- name: Install cgit and dependencies
+ apt: name={{ item }} state=present update_cache=yes
with_items:
- - gcc
- - libssl-dev
- - make
+ - cgit=1.2.1-linaro1
- python3-markdown
- python3-docutils
-# cgit isn't available in Trusty and we have patches not available in Xenial,
-# so we install this by hand in the most idempotent way we can:
-- name: Clone cgit repository
- git: name=https://{{ linaro_git_server }}/infrastructure/cgit
- dest={{ tools_checkout_dir }}/cgit
- version="linaro-patches" track_submodules=no
- notify:
- - build-cgit
-
- name: Link cgit css into apache directory
- file: src={{ tools_checkout_dir }}/cgit/cgit.css
+ file: src=/usr/share/cgit/cgit.css
dest={{ apache_root }}/cgit/cgit-css/cgit.css
state=link
@@ -39,16 +38,13 @@
- name: Create a wrapper script to the cgit binary
copy: dest={{ apache_root }}/cgit/cgit owner=root group=root mode=0755
- content="#!/bin/sh\n{{ tools_checkout_dir }}/cgit/cgit\n"
+ content="#!/bin/sh\n/usr/lib/cgit/cgit.cgi\n"
- name: Install git-http-backend suexec script
template: src=git-http-backend.cgi
dest={{ apache_root }}/cgit/git-http-backend.cgi
mode=0755
-- name: Create a symlink for rst2html.py
- file: src=/usr/bin/rst2html dest=/usr/bin/rst2html.py state=link
-
- name: Install authentication commands command (only used by private servers)
template: src={{ item }} dest={{ apache_root }}/cgit/
owner=root group=root mode=0755
diff --git a/roles/cgit/templates/cgitrc b/roles/cgit/templates/cgitrc
index 5b9a1f10..526b3d6d 100644
--- a/roles/cgit/templates/cgitrc
+++ b/roles/cgit/templates/cgitrc
@@ -57,7 +57,7 @@ readme=:INSTALL
readme=:install
readme=gitolite/readme:README.html
-about-filter={{tools_checkout_dir}}/cgit/filters/about-formatting.sh
+about-filter=/usr/lib/cgit/filters/about-formatting.sh
section-from-path=1
scan-path={{repo_root}}