From ec26dfb6c270487a0658aceb3298dad225189e1b Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Mon, 26 Sep 2022 13:25:22 +0200 Subject: Remove git-gitolite playbook --- playbooks.d/git-gitolite/description.txt | 1 - playbooks.d/git-gitolite/etc/defaults | 2 -- playbooks.d/git-gitolite/playbook.bash | 53 -------------------------------- registry.d/edephas.tyil.net | 1 - 4 files changed, 57 deletions(-) delete mode 100644 playbooks.d/git-gitolite/description.txt delete mode 100644 playbooks.d/git-gitolite/etc/defaults delete mode 100644 playbooks.d/git-gitolite/playbook.bash 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 -- cgit v1.1