]> birchwood-abbey.net Git - Network.git/commitdiff
Execute gitweb tasks before configuring Apache.
authorMatt Birkholz <matt@birchwood-abbey.net>
Mon, 22 Dec 2025 16:18:32 +0000 (09:18 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Mon, 22 Dec 2025 16:18:32 +0000 (09:18 -0700)
Otherwise the apache2_module will fail, unable to validate an
incomplete configuration.

README.org
roles_t/abbey-core/tasks/main.yml
roles_t/abbey-front/tasks/main.yml

index f2cb1e8333756bf50487d6b06e8ec07dfd61da04..e3eda9fc6289673372cf2f57fb861a2549c8259f 100644 (file)
@@ -451,6 +451,8 @@ rest of the Let's Encrypt configuration is discussed in the following
 #+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:
@@ -464,8 +466,6 @@ rest of the Let's Encrypt configuration is discussed in the following
         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=]]
@@ -964,6 +964,8 @@ site on Front.  Their configurations include the same [[apache-abbey][~apache-ab
 #+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:
@@ -989,8 +991,6 @@ site on Front.  Their configurations include the same [[apache-abbey][~apache-ab
     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=]]
index c8191aa64bd465258a9c7782538806cf30d37e30..7ffca9e20952d51c1d0a4b4134a1d7ba1c702bbe 100644 (file)
     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:
index 168b19519b9f23b6c6757a935f8710a4d72e0959..ca31e82df4e67acb16900542b7a18633b07a75b2 100644 (file)
     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: