Skip to content

Commit 2ff7206

Browse files
Cleanup old repository
1 parent cb081ea commit 2ff7206

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tasks/install_apt.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@
3737
creates: /usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg
3838
when: ansible_facts['pkg_mgr'] == 'apt'
3939

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: "{{ postgresql_apt_repository }}"
45+
state: absent
46+
when:
47+
- ansible_facts['pkg_mgr'] == 'apt'
48+
- (postgresql_install_repository | default(true)) | bool
49+
4050
# --- Add the PGDG APT repository (HTTPS + signed-by) ---
4151
# We explicitly build the repo line to ensure the correct suite and signed-by usage.
4252
- name: Add PGDG APT repository

0 commit comments

Comments
 (0)