---
- name: Install dbus for debian system
  apt:
    name: dbus
  when:
    - ansible_os_family == 'Debian'
  become: true

- block:
    # NOTE(mgoddard): The CentOS image used in CI has epel-release installed,
    # but the configure-mirrors role used by Zuul disables epel. Since we
    # install epel-release and expect epel to be enabled, enable it here.
    - name: Ensure dnf-plugins-core is installed
      package:
        name: dnf-plugins-core
        state: present

    - name: Enable the EPEL repository
      command: dnf config-manager --enable epel
  when: ansible_os_family in ['RedHat', 'Rocky']
  become: true
