Skip to content

Commit

Permalink
Install postgresql-client-14 on server for backups (#2050)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwr18 authored Oct 7, 2024
1 parent 55dc84c commit d4e92ff
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/roles/initial_setup/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- include_tasks: set_hostname.yml
- include_tasks: packages.yml
- include_tasks: postgresql_client.yml
- include_tasks: ansible_user.yml
- include_tasks: upload_public_keys.yml
- include_tasks: security.yml

20 changes: 20 additions & 0 deletions ansible/roles/initial_setup/tasks/postgresql_client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: Add pgdg repo to sources.list.d
lineinfile:
path: /etc/apt/sources.list.d/pgdg.list
line: "deb http://apt.postgresql.org/pub/repos/apt {{ ansible_distribution_release }}-pgdg main"
create: true

- name: Download PostgreSQL key and add it to system keyring
apt_key:
url: https://www.postgresql.org/media/keys/ACCC4CF8.asc
state: present

- name: Update apt cache
apt:
update_cache: yes

- name: Install postgresql-client-14 for backups
apt:
name: postgresql-client-14
state: present

0 comments on commit d4e92ff

Please sign in to comment.