forgejo: create namespace prior to PVC creation

Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
This commit is contained in:
David Kirwan
2025-07-31 14:57:16 +01:00
parent 04dcafe578
commit f32c33a26b
3 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
---
- name: Generate the forgejo-namespace.yml from template
ansible.builtin.template:
src: "forgejo-namespace.yml.j2"
dest: "/root/ocp4/openshift-apps/forgejo/forgejo-namespace.yml"
mode: "0770"
- name: Deploy the forgejo-namespace.yml config
kubernetes.core.k8s:
state: present
src: "/root/ocp4/openshift-apps/forgejo/forgejo-namespace.yml"

View File

@@ -4,6 +4,7 @@
path: "/root/ocp4/openshift-apps/forgejo/"
state: directory
- include_tasks: create-forgejo-namespace.yml
- include_tasks: create-forgejo-pvc.yml
- include_tasks: create-postgres-operator-config.yml
#- include_tasks: deploy-valkey.yml

View File

@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: "forgejo"