#+CAPTION: [[file:roles_t/abbey-front/tasks/main.yml][=roles_t/abbey-front/tasks/main.yml=]]
#+BEGIN_SRC conf :tangle roles_t/abbey-front/tasks/main.yml :noweb no-export
+<<apache-gitweb-tasks>>
+
- name: Configure Apache.
become: yes
vars:
IncludeOptional /etc/letsencrypt/options-ssl-apache.conf
dest: /etc/apache2/sites-available/birchwood-abbey.net-vhost.conf
notify: Restart Apache2.
-
-<<apache-gitweb-tasks>>
#+END_SRC
#+CAPTION: [[file:roles_t/abbey-front/handlers/main.yml][=roles_t/abbey-front/handlers/main.yml=]]
#+CAPTION: [[file:roles_t/abbey-core/tasks/main.yml][=roles_t/abbey-core/tasks/main.yml=]]
#+BEGIN_SRC conf :tangle roles_t/abbey-core/tasks/main.yml :noweb no-export
+<<apache-gitweb-tasks>>
+
- name: Configure live website.
become: yes
vars:
dest: /etc/apache2/sites-available/test-vhost.conf
mode: u=rw,g=r,o=r
notify: Restart Apache2.
-
-<<apache-gitweb-tasks>>
#+END_SRC
#+CAPTION: [[file:roles_t/abbey-core/handlers/main.yml][=roles_t/abbey-core/handlers/main.yml=]]
group: staff
mode: u=rwx,g=srwx,o=rx
+- name: Enable Apache2 rewrite module for Gitweb.
+ become: yes
+ apache2_module: name=rewrite
+ notify: Restart Apache2.
+
+- name: Enable Apache2 cgid module.
+ become: yes
+ apache2_module: name=cgid
+ notify: Restart Apache2.
+
+- name: Install libcgi-pm-perl for Gitweb.
+ become: yes
+ apt: pkg=libcgi-pm-perl
+
+- name: Link Gitweb into /cgi-bin/.
+ become: yes
+ file:
+ state: link
+ path: /usr/lib/cgi-bin/{{ item }}
+ src: /usr/share/gitweb/{{ item }}
+ loop: [ gitweb.cgi, index.cgi ]
+
+- name: Override Gitweb assets location.
+ become: yes
+ copy:
+ content: |
+ $projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/var/www/git";
+ @stylesheets = ("/gitweb-static/gitweb.css");
+ $logo = "/gitweb-static/git-logo.png";
+ $favicon = "/favicon.ico";
+ $javascript = "/gitweb-static/gitweb.js";
+ dest: /etc/gitweb.conf
+ mode: u=rw,g=r,o=r
+
- name: Configure live website.
become: yes
vars:
mode: u=rw,g=r,o=r
notify: Restart Apache2.
-- name: Enable Apache2 rewrite module for Gitweb.
- become: yes
- apache2_module: name=rewrite
- notify: Restart Apache2.
-
-- name: Enable Apache2 cgid module.
- become: yes
- apache2_module: name=cgid
- notify: Restart Apache2.
-
-- name: Install libcgi-pm-perl for Gitweb.
- become: yes
- apt: pkg=libcgi-pm-perl
-
-- name: Link Gitweb into /cgi-bin/.
- become: yes
- file:
- state: link
- path: /usr/lib/cgi-bin/{{ item }}
- src: /usr/share/gitweb/{{ item }}
- loop: [ gitweb.cgi, index.cgi ]
-
-- name: Override Gitweb assets location.
- become: yes
- copy:
- content: |
- $projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/var/www/git";
- @stylesheets = ("/gitweb-static/gitweb.css");
- $logo = "/gitweb-static/git-logo.png";
- $favicon = "/favicon.ico";
- $javascript = "/gitweb-static/gitweb.js";
- dest: /etc/gitweb.conf
- mode: u=rw,g=r,o=r
-
- name: Configure house website.
become: yes
copy:
group: staff
mode: u=rwx,g=srwx,o=rx
+- name: Enable Apache2 rewrite module for Gitweb.
+ become: yes
+ apache2_module: name=rewrite
+ notify: Restart Apache2.
+
+- name: Enable Apache2 cgid module.
+ become: yes
+ apache2_module: name=cgid
+ notify: Restart Apache2.
+
+- name: Install libcgi-pm-perl for Gitweb.
+ become: yes
+ apt: pkg=libcgi-pm-perl
+
+- name: Link Gitweb into /cgi-bin/.
+ become: yes
+ file:
+ state: link
+ path: /usr/lib/cgi-bin/{{ item }}
+ src: /usr/share/gitweb/{{ item }}
+ loop: [ gitweb.cgi, index.cgi ]
+
+- name: Override Gitweb assets location.
+ become: yes
+ copy:
+ content: |
+ $projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/var/www/git";
+ @stylesheets = ("/gitweb-static/gitweb.css");
+ $logo = "/gitweb-static/git-logo.png";
+ $favicon = "/favicon.ico";
+ $javascript = "/gitweb-static/gitweb.js";
+ dest: /etc/gitweb.conf
+ mode: u=rw,g=r,o=r
+
- name: Configure Apache.
become: yes
vars:
dest: /etc/apache2/sites-available/birchwood-abbey.net-vhost.conf
notify: Restart Apache2.
-- name: Enable Apache2 rewrite module for Gitweb.
- become: yes
- apache2_module: name=rewrite
- notify: Restart Apache2.
-
-- name: Enable Apache2 cgid module.
- become: yes
- apache2_module: name=cgid
- notify: Restart Apache2.
-
-- name: Install libcgi-pm-perl for Gitweb.
- become: yes
- apt: pkg=libcgi-pm-perl
-
-- name: Link Gitweb into /cgi-bin/.
- become: yes
- file:
- state: link
- path: /usr/lib/cgi-bin/{{ item }}
- src: /usr/share/gitweb/{{ item }}
- loop: [ gitweb.cgi, index.cgi ]
-
-- name: Override Gitweb assets location.
- become: yes
- copy:
- content: |
- $projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/var/www/git";
- @stylesheets = ("/gitweb-static/gitweb.css");
- $logo = "/gitweb-static/git-logo.png";
- $favicon = "/favicon.ico";
- $javascript = "/gitweb-static/gitweb.js";
- dest: /etc/gitweb.conf
- mode: u=rw,g=r,o=r
-
- name: Configure Apache log archival.
become: yes
lineinfile: