summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/gitserver/files/git-daemon.service14
-rw-r--r--roles/gitserver/files/override.conf4
-rw-r--r--roles/gitserver/tasks/main.yml12
3 files changed, 14 insertions, 16 deletions
diff --git a/roles/gitserver/files/git-daemon.service b/roles/gitserver/files/git-daemon.service
deleted file mode 100644
index e08d066..0000000
--- a/roles/gitserver/files/git-daemon.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Git Daemon Instance
-
-[Service]
-User=git
-# The '-' is to ignore non-zero exit statuses
-ExecStart=-/usr/lib/git-core/git-daemon --inetd --base-path=/srv/git
-StandardInput=socket
-StandardOutput=inherit
-StandardError=journal
-ProtectSystem=full
-ProtectHome=on
-PrivateDevices=on
-NoNewPrivileges=on
diff --git a/roles/gitserver/files/override.conf b/roles/gitserver/files/override.conf
new file mode 100644
index 0000000..78bcf58
--- /dev/null
+++ b/roles/gitserver/files/override.conf
@@ -0,0 +1,4 @@
+[Service]
+ExecStart=
+# The '-' is to ignore non-zero exit statuses
+ExecStart=-/usr/lib/git-core/git-daemon --inetd --base-path=/srv/git
diff --git a/roles/gitserver/tasks/main.yml b/roles/gitserver/tasks/main.yml
index cdb7765..d612a10 100644
--- a/roles/gitserver/tasks/main.yml
+++ b/roles/gitserver/tasks/main.yml
@@ -73,10 +73,18 @@
group: git
mode: u+rwx,g+r,o+r
+- name: Setup directory for git-daemon systemd override
+ ansible.builtin.file:
+ path: /etc/systemd/system/git-daemon@.service.d
+ state: directory
+ owner: root
+ group: root
+ mode: u+rw,g+r,o+r
+
- name: Configure git-daemon systemd service
ansible.builtin.copy:
- src: files/git-daemon.service
- dest: /usr/lib/systemd/system/git-daemon@.service
+ src: files/override.conf
+ dest: /etc/systemd/system/git-daemon@.service.d
owner: root
group: root
mode: u+rw,g+r,o+r