--- /dev/null
+# Copyright (c) 2023 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+
+- name: Execute postgres playbook
+ shell: /usr/bin/ansible-playbook --connection=local \
+ /srv/git/server.git/postgres.yaml
+- name: Restore database from backup
+ command: /usr/bin/psql --username=postgres --file=/tmp/database
- include_tasks: install/certify.yaml
with_items: "{{ certificates }}"
- include_tasks: install/environment.yaml
+ - include_tasks: install/database.yaml
+
- find:
paths: "/srv/git"
file_type: file
- name: Execute configuration playbook
shell: /usr/bin/ansible-playbook --connection=local {{ item.path }}
with_items: "{{ post_receive_scripts.files }}"
- - name: Restart postgresql
- service:
- name: postgresql
- state: restarted
- become: yes
- - name: Restore database from backup
- command: /usr/bin/psql --username=postgres --file=/tmp/database
- include_tasks: install/ssh_public_keys.yaml
with_items: "{{ users }}"