File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,11 @@ postgresql_pgdg_key_dest: "{{ postgresql_apt_keys_dir }}/pgdg.asc"
5
5
postgresql_pgdg_key_url : " https://www.postgresql.org/media/keys/ACCC4CF8.asc"
6
6
postgresql_pgdg_repo : " deb [signed-by={{ postgresql_pgdg_key_dest }}] http://apt.postgresql.org/pub/repos/apt/ {{ ansible_distribution_release }}-pgdg main"
7
7
8
- postgresql_default_version : 10
8
+ postgresql_default_version : 15
9
9
postgresql_user_name : postgres
10
10
11
+ postgresql_install_psycopg2 : true
12
+
11
13
# Point-In-Time Recovery (PITR) backup options
12
14
# https://www.postgresql.org/docs/current/continuous-archiving.html
13
15
postgresql_backup_local_dir : >-
Original file line number Diff line number Diff line change 40
40
set_fact :
41
41
postgresql_version : " {{ __postgresql_version_query_result.stdout.split('+') | first }}"
42
42
when : postgresql_version is not defined
43
+
44
+ - name : Install psycopg2
45
+ apt :
46
+ name : " python{{ (ansible_python.version.major == 3) | ternary('3', '') }}-psycopg2"
47
+ when : postgresql_install_psycopg2
Original file line number Diff line number Diff line change 72
72
when : >-
73
73
ansible_distribution_major_version is version(7, '>=')
74
74
and (pgdata_stat.stat.isdir is not defined or not pgdata_stat.stat.isdir)
75
+
76
+ - name : Install psycopg2
77
+ yum :
78
+ name : " python{{ ansible_python.version.major }}-psycopg2"
79
+ when : postgresql_install_psycopg2
You can’t perform that action at this time.
0 commit comments