diff --git a/build/ansible/pmm2/post-build-actions.yml b/build/ansible/pmm2/post-build-actions.yml index 0f5fafdc10..65d29b38e0 100644 --- a/build/ansible/pmm2/post-build-actions.yml +++ b/build/ansible/pmm2/post-build-actions.yml @@ -127,10 +127,20 @@ ignore_errors: yes when: ansible_virtualization_type != "docker" - - name: Remove pmm-managed database + - name: Remove pmm-managed database EL7 + when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7' + postgresql_db: + login_user: postgres + name: pmm-managed + state: absent + register: db_check_result + + - name: Remove pmm-managed database EL9 + when: (ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux') and ansible_distribution_major_version == '9' postgresql_db: login_user: postgres name: pmm-managed + force: true state: absent register: db_check_result