We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cb081ea + 2ea47c3 commit a871348Copy full SHA for a871348
1 file changed
tasks/install_apt.yml
@@ -37,6 +37,16 @@
37
creates: /usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg
38
when: ansible_facts['pkg_mgr'] == 'apt'
39
40
+# --- Remove old repository file ---
41
+# We use a new repo file in next task
42
+- name: PostgreSQL | Remove old PostgreSQL repository | apt
43
+ apt_repository:
44
+ repo: "deb http://apt.postgresql.org/pub/repos/apt/ {{ ansible_distribution_release }}-pgdg main {{ postgresql_version }}"
45
+ state: absent
46
+ when:
47
+ - ansible_facts['pkg_mgr'] == 'apt'
48
+ - (postgresql_install_repository | default(true)) | bool
49
+
50
# --- Add the PGDG APT repository (HTTPS + signed-by) ---
51
# We explicitly build the repo line to ensure the correct suite and signed-by usage.
52
- name: Add PGDG APT repository
0 commit comments