-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtasks_postgres_client.yml
More file actions
48 lines (41 loc) · 1.45 KB
/
Copy pathtasks_postgres_client.yml
File metadata and controls
48 lines (41 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# postgresql-client-17 client libraries and client binaries
# postgresql-17 core database server
# postgresql-doc-17 documentation
# libpq-dev libraries and headers for C language frontend development
# postgresql-server-dev-17 libraries and headers for C language backend development
- name: PostgreSQL Client | Ensure necessary packages are installed
ansible.builtin.apt:
name:
- curl
- ca-certificates
state: present
update_cache: yes
become: true
- name: PostgreSQL Client | Create directory for PostgreSQL GPG key
ansible.builtin.file:
path: /usr/share/postgresql-common/pgdg
state: directory
mode: '0755'
become: true
- name: PostgreSQL Client | Download PostgreSQL GPG key
ansible.builtin.get_url:
url: https://www.postgresql.org/media/keys/ACCC4CF8.asc
dest: /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
mode: '0644'
become: true
- name: PostgreSQL Client | Create PostgreSQL APT source list
ansible.builtin.apt_repository:
repo: "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt {{ ansible_distribution_release }}-pgdg main"
filename: "pgdg"
become: true
- name: PostgreSQL Client | Update package lists
ansible.builtin.apt:
update_cache: yes
become: true
- name: PostgreSQL Client | Install
ansible.builtin.apt:
name:
- postgresql-client-17
state: present
update_cache: yes
become: true