summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-09-26 13:25:22 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-09-26 13:25:22 +0200
commitec26dfb6c270487a0658aceb3298dad225189e1b (patch)
tree067f21d7e150128f35e7d9b79d1e33725ec46ecb
parentc8fa67085a2564495582e976396fa9ff66ae14bd (diff)
Remove git-gitolite playbook
-rw-r--r--playbooks.d/git-gitolite/description.txt1
-rw-r--r--playbooks.d/git-gitolite/etc/defaults2
-rw-r--r--playbooks.d/git-gitolite/playbook.bash53
-rw-r--r--registry.d/edephas.tyil.net1
4 files changed, 0 insertions, 57 deletions
diff --git a/playbooks.d/git-gitolite/description.txt b/playbooks.d/git-gitolite/description.txt
deleted file mode 100644
index 592b2aa..0000000
--- a/playbooks.d/git-gitolite/description.txt
+++ /dev/null
@@ -1 +0,0 @@
-Simple git server with gitolite
diff --git a/playbooks.d/git-gitolite/etc/defaults b/playbooks.d/git-gitolite/etc/defaults
deleted file mode 100644
index 9af718a..0000000
--- a/playbooks.d/git-gitolite/etc/defaults
+++ /dev/null
@@ -1,2 +0,0 @@
-pkg.gitolite=gitolite
-git.repodir=/var/lib/gitolite
diff --git a/playbooks.d/git-gitolite/playbook.bash b/playbooks.d/git-gitolite/playbook.bash
deleted file mode 100644
index e306665..0000000
--- a/playbooks.d/git-gitolite/playbook.bash
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env bash
-
-playbook_add() {
- case "${BASHTARD_PLATFORM[distro]}" in
- gentoo)
- mkdir -pv "/etc/portage/package.use"
- printf "acct-user/git gitolite" > /etc/portage/package.use/bashtard-gitolite
- ;;
- *)
- notice "$BASHTARD_PLAYBOOK" "Creating user 'git'"
- useradd \
- --home-dir "$(config "git.repodir")" \
- --create-home \
- --shell "$(config "fs.bindir")/git-shell" \
- git
- ;;
- esac
-
- notice "$BASHTARD_PLAYBOOK" "Installing packages"
- pkg install \
- "$(config "pkg.gitolite")"
-
- playbook_sync
-}
-
-playbook_sync() {
- notice "$BASHTARD_PLAYBOOK" "Ensuring all desired repositories exist"
- while read -r repo
- do
- local name="$(config "git.repos.$repo.name" "$repo")"
- local path="$(config "git.repodir")/$(config "git.repos.$repo.path" "$name")"
-
- info "$BASHTARD_PLAYBOOK" "Ensuring $name exists ($repo)"
-
- if [[ ! -d "$path" ]]
- then
- notice "$BASHTARD_PLAYBOOK" "Creating bare repository at $path"
- mkdir -pv -- "$path"
- git -C "$path" --bare init
- fi
-
- printf "$(config "git.repos.$repo.description" "Nondescript")\n" > "$path/description"
- done < <(config_subkeys "git.repos")
-}
-
-playbook_del() {
- notice "$BASHTARD_PLAYBOOK" "Removing packages"
- pkg uninstall \
- "$(config "pkg.gitolite")"
-
- notice "$BASHTARD_PLAYBOOK" "Cleaning up srv directory"
- rm -frv --one-file-system -- "$(config "git.repodir")"
-}
diff --git a/registry.d/edephas.tyil.net b/registry.d/edephas.tyil.net
index 671c3d4..6d2e6d3 100644
--- a/registry.d/edephas.tyil.net
+++ b/registry.d/edephas.tyil.net
@@ -1,5 +1,4 @@
backup-borg
-git-gitolite
k3s-master
ssh
user-tyil