diff --git a/tasks/install_apt.yml b/tasks/install_apt.yml index 3cf6a905..6f60611d 100644 --- a/tasks/install_apt.yml +++ b/tasks/install_apt.yml @@ -74,6 +74,24 @@ tags: - rabbitmq-repos +# NOTE(noonedeadpunk): Remove this after Z release +- name: Remove old repos + apt_repository: + repo: "{{ item.repo }}" + state: absent + filename: "{{ item.filename | default(omit) }}" + update_cache: no + with_items: + - repo: "deb https://packagecloud.io/rabbitmq/rabbitmq-server/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] | lower }} main" + filename: "{{ rabbitmq_repo.filename | default(omit) }}" + condition: "{{ (rabbitmq_install_method == 'external_repo') }}" + - repo: "deb https://packages.erlang-solutions.com/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release'] | lower }} contrib" + filename: "{{ rabbitmq_erlang_repo.filename | default(omit) }}" + condition: "{{ (rabbitmq_erlang_install_method == 'external_repo') }}" + when: + - item.condition | default(True) + - rabbitmq_upgrade | bool + # Due to our Ansible strategy, a skipped task does not # have a dictionary result, so we have to cater to the # situation where either of the apt_repository tasks