From bc6ac859cf07e6388d9a669c074e29e5d8790ab6 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Tue, 30 Dec 2025 20:12:39 -0700 Subject: [PATCH] Add section Configure Gitweb on Core. Much like section Configure Gitweb on Front. Both sections now have source code blocks containing ~<>~ (formerly ~<>~) and ~<>~, tangling them into the role. (They were previously tangled in in the "Configure Apache..." sections). --- README.org | 74 +++++++++++++++------------ roles_t/abbey-core/handlers/main.yml | 5 ++ roles_t/abbey-front/handlers/main.yml | 11 ++-- 3 files changed, 52 insertions(+), 38 deletions(-) diff --git a/README.org b/README.org index c02bbc0..577c2ca 100644 --- a/README.org +++ b/README.org @@ -308,6 +308,11 @@ like ~git-tasks~ and ~git-handlers~. #+CAPTION: ~git-handlers~ #+BEGIN_SRC conf +- name: Reload systemd. + become: yes + systemd: + daemon-reload: yes + - name: Restart git-daemon. become: yes systemd: @@ -381,8 +386,14 @@ directive. The global Perl configuration file, =/etc/gitweb.conf=, overrides the relative URLs Gitweb normally generates, and uses the web site =/favicon.ico=. -#+NAME: apache-gitweb-tasks -#+CAPTION: ~apache-gitweb-tasks~ +#+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 + +<> +#+END_SRC + +#+NAME: gitweb-tasks +#+CAPTION: ~gitweb-tasks~ #+BEGIN_SRC conf - name: Enable Apache2 rewrite module for Gitweb. become: yes @@ -419,8 +430,14 @@ web site =/favicon.ico=. mode: u=rw,g=r,o=r #+END_SRC -#+NAME: apache-gitweb-handlers -#+CAPTION: ~apache-gitweb-handlers~ +#+CAPTION: [[file:roles_t/abbey-front/handlers/main.yml][=roles_t/abbey-front/handlers/main.yml=]] +#+BEGIN_SRC conf :tangle roles_t/abbey-front/handlers/main.yml :noweb no-export + +<> +#+END_SRC + +#+NAME: gitweb-handlers +#+CAPTION: ~gitweb-handlers~ #+BEGIN_SRC conf - name: Restart Apache2. become: yes @@ -505,8 +522,6 @@ 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 -<> - - name: Configure Apache. become: yes vars: @@ -522,12 +537,6 @@ rest of the Let's Encrypt configuration is discussed in the following notify: Restart Apache2. #+END_SRC -#+CAPTION: [[file:roles_t/abbey-front/handlers/main.yml][=roles_t/abbey-front/handlers/main.yml=]] -#+BEGIN_SRC conf :tangle roles_t/abbey-front/handlers/main.yml :noweb no-export - -<> -#+END_SRC - ** Configure Apache Log Archival These tasks hack Apache's ~logrotate(8)~ configuration to rotate @@ -591,16 +600,6 @@ The replacement =logrotate-mailer= does, and includes it in a notify: Reload systemd. #+END_SRC -#+CAPTION: [[file:roles_t/abbey-front/handlers/main.yml][=roles_t/abbey-front/handlers/main.yml=]] -#+BEGIN_SRC conf :tangle roles_t/abbey-front/handlers/main.yml - -- name: Reload systemd. - become: yes - systemd: - daemon_reload: yes - tags: actualizer -#+END_SRC - Note that the first setting for ~ExecStart~ is intended to clear the system's ~ExecStart~ in =/lib/systemd/system/logrotate.service=. (A ~oneshot~ service like this can have multiple ~ExecStart~ settings. @@ -993,8 +992,8 @@ e.g. ~mythtv@mythtv.birchwood.private~, locally.) ** Configure Git Daemon on Core These tasks are identical to those executed on Front, for similar Git -services on Front and Core. See [[Configure Git Daemon on Front]] and -[[*Configure Gitweb on Front][Configure Gitweb on Front]] for more information. +services on Front and Core. See [[Configure Git Daemon on Front]] for +more information. #+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 @@ -1008,6 +1007,25 @@ services on Front and Core. See [[Configure Git Daemon on Front]] and <> #+END_SRC +** Configure Gitweb on Core + +The tasks that configure Apache to run Gitweb on Core should be +(nearly) identical to those on Front, so that the Gitweb service on +Core provides a preview of the service on Front. See [[*Configure Gitweb on Front][Configure Gitweb +on Front]] for more information. + +#+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 + +<> +#+END_SRC + +#+CAPTION: [[file:roles_t/abbey-core/handlers/main.yml][=roles_t/abbey-core/handlers/main.yml=]] +#+BEGIN_SRC conf :tangle roles_t/abbey-core/handlers/main.yml :noweb no-export + +<> +#+END_SRC + ** Configure Apache on Core The Apache2 configuration on Core specifies three web sites (live, @@ -1018,8 +1036,6 @@ 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 -<> - - name: Configure live website. become: yes vars: @@ -1047,12 +1063,6 @@ site on Front. Their configurations include the same [[apache-abbey][~apache-ab notify: Restart Apache2. #+END_SRC -#+CAPTION: [[file:roles_t/abbey-core/handlers/main.yml][=roles_t/abbey-core/handlers/main.yml=]] -#+BEGIN_SRC conf :tangle roles_t/abbey-core/handlers/main.yml :noweb no-export - -<> -#+END_SRC - ** Configure Documentation URLs The institute serves its =/usr/share/doc/= on the house (campus) web diff --git a/roles_t/abbey-core/handlers/main.yml b/roles_t/abbey-core/handlers/main.yml index 1612e5f..d62ac62 100644 --- a/roles_t/abbey-core/handlers/main.yml +++ b/roles_t/abbey-core/handlers/main.yml @@ -4,6 +4,11 @@ command: newaliases tags: actualizer +- name: Reload systemd. + become: yes + systemd: + daemon-reload: yes + - name: Restart git-daemon. become: yes systemd: diff --git a/roles_t/abbey-front/handlers/main.yml b/roles_t/abbey-front/handlers/main.yml index 41e84cd..de939e3 100644 --- a/roles_t/abbey-front/handlers/main.yml +++ b/roles_t/abbey-front/handlers/main.yml @@ -4,6 +4,11 @@ command: newaliases tags: actualizer +- name: Reload systemd. + become: yes + systemd: + daemon-reload: yes + - name: Restart git-daemon. become: yes systemd: @@ -18,12 +23,6 @@ state: restarted tags: actualizer -- name: Reload systemd. - become: yes - systemd: - daemon_reload: yes - tags: actualizer - - name: Import root@core's public key. become: yes command: gpg --import ~/.gnupg-root-pub.pem -- 2.47.3