Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible/group_vars/all/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ secret_svsticky_deploy:
github_pat_download_artifact: "{{ vault_secret_svsticky_deploy.github_pat_download_artifact }}"

postgres:
pg_hba_path: '/etc/postgresql/13/main/pg_hba.conf'
pg_hba_path: '/etc/postgresql/14/main/pg_hba.conf'
4 changes: 2 additions & 2 deletions ansible/playbooks/restore-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@
label: "{{ item.stdout }}"

- name: "remove all existing databases on target server"
command: "pg_dropcluster --stop 13 main"
command: "pg_dropcluster --stop 14 main"
ignore_errors: true

- name: "create pg cluster"
command: "pg_createcluster --start 13 main"
command: "pg_createcluster --start 14 main"

- name: "restore production databases - postgres" # noqa risky-shell-pipe
shell: "zcat {{ backup_restore_tmp_dir.path }}/{{ item.stdout }} | sudo -u postgres psql"
Expand Down
4 changes: 3 additions & 1 deletion ansible/roles/databases/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- name: "ensure postgresql is installed and manageable"
ansible.builtin.apt:
name:
- "postgresql-13"
- "postgresql-14" # Installs postgres 14 if not installed yet
- "python3-psycopg2"

- name: "Explicitly specify peer auth as default over local communication"
Expand All @@ -40,6 +40,7 @@
- name: "ensure tavern user exists"
community.postgresql.postgresql_user:
name: "tavern"
password: "{{ secret_tavern.postgres_password }}"

- name: "ensure tavern database exists"
community.postgresql.postgresql_db:
Expand Down Expand Up @@ -68,6 +69,7 @@
- name: "ensure keycloak user exists"
community.postgresql.postgresql_user:
name: "keycloak"
password: "{{ secret_keycloak.db_password }}"

- name: "ensure keycloak database exists"
community.postgresql.postgresql_db:
Expand Down
Loading