diff --git a/roles/openshift-apps/forgejo/tasks/create-postgres-operator-config.yml b/roles/openshift-apps/forgejo/tasks/create-postgres-operator-config.yml new file mode 100644 index 0000000000..49b2403739 --- /dev/null +++ b/roles/openshift-apps/forgejo/tasks/create-postgres-operator-config.yml @@ -0,0 +1,22 @@ +--- +- name: Generate the postgres-cluster.yaml from template + ansible.builtin.template: + src: "postgres-cluster.yaml.j2" + dest: "/root/ocp4/openshift-apps/forgejo/postgres-cluster.yaml" + mode: "0770" + +- name: Generate the postgres-secret.yaml from template + ansible.builtin.template: + src: "postgres-secret.yaml.j2" + dest: "/root/ocp4/openshift-apps/forgejo/postgres-secret.yaml" + mode: "0770" + +- name: Deploy the postgres-cluster.yaml config + kubernetes.core.k8s: + state: present + src: "/root/ocp4/openshift-apps/forgejo/postgres-cluster.yaml" + +- name: Deploy the postgres-secret.yaml secret + kubernetes.core.k8s: + state: present + src: "/root/ocp4/openshift-apps/forgejo/postgres-secret.yaml" diff --git a/roles/openshift-apps/forgejo/tasks/main.yml b/roles/openshift-apps/forgejo/tasks/main.yml index d5a44b6ca8..5089049ebc 100644 --- a/roles/openshift-apps/forgejo/tasks/main.yml +++ b/roles/openshift-apps/forgejo/tasks/main.yml @@ -5,3 +5,4 @@ state: directory - include_tasks: call-helm.yml +- include_tasks: create-postgres-operator-config.yml