]> xn--ix-yja.es Git - infrastructure.git/commitdiff
Add basic Git hosting
authoralex <alex@pdp7.net>
Sat, 11 Oct 2025 08:52:14 +0000 (10:52 +0200)
committeralex <alex@pdp7.net>
Sat, 11 Oct 2025 08:52:14 +0000 (10:52 +0200)
infrastructure/roles/git/README.md [new file with mode: 0644]
infrastructure/roles/git/tasks/main.yaml [new file with mode: 0644]
infrastructure/site.yaml

diff --git a/infrastructure/roles/git/README.md b/infrastructure/roles/git/README.md
new file mode 100644 (file)
index 0000000..ca32c99
--- /dev/null
@@ -0,0 +1,19 @@
+# git
+
+## Create a repository
+
+On the server:
+
+```
+mkdir -p ~/git
+cd ~/git
+git init --bare $REPO
+```
+
+## Push an existing repository
+
+```
+git remote add $REMOTE_NAME $SERVER:git/$REPO
+git push $REMOTE_NAME main
+```
+
diff --git a/infrastructure/roles/git/tasks/main.yaml b/infrastructure/roles/git/tasks/main.yaml
new file mode 100644 (file)
index 0000000..79fad63
--- /dev/null
@@ -0,0 +1,3 @@
+- name: install git
+  ansible.builtin.package:
+    name: git
index 9febc362a125b1b9066e59ca671cec10b8b4d8d1..96e7048a6f871faa807a481db54604573f42bc7d 100644 (file)
@@ -3,4 +3,4 @@
   roles:
     - users
     - motd
-
+    - git