--- # Playbook to fix Forgejo deployment by switching to standard PostgreSQL # This is the Ansible equivalent of the bash script fix-forgejo-standard-postgres.sh - name: Fix Forgejo deployment - Switch to standard PostgreSQL hosts: localhost connection: local become: false gather_facts: false vars: forgejo_namespace: "container-mom-git" forgejo_use_postgres_ha: false # This is critical - ensure we use standard PostgreSQL k8s_context: "" # Use the current context storage_class_name: "forgejo-local-storage" tasks: - name: Ensure kubeconfig is set ansible.builtin.set_fact: kubeconfig: "{{ kubeconfig | default(lookup('env', 'KUBECONFIG')) }}" - name: Apply Forgejo role with standard PostgreSQL ansible.builtin.include_role: name: forgejo_deployment vars: k8s_auth_params: kubeconfig: "{{ kubeconfig }}" context: "{{ k8s_context }}" validate_certs: true forgejo_storage_class_name: "{{ storage_class_name }}" cleanup_resources: true - name: Display success message ansible.builtin.debug: msg: | Forgejo has been successfully reconfigured to use standard PostgreSQL. You can access the deployment at {{ forgejo_root_url }} Admin credentials: Username: {{ forgejo_admin_username }} Password: {{ forgejo_admin_password }} Database credentials: Username: forgejo Password: {{ forgejo_db_password }}