---

- name: Configure Zimbra repo
  yum_repository:
    file: zimbra
    name: "{{ item.name }}"
    description: "{{ item.description }}"
    baseurl: "{{ item.baseurl }}"
    gpgcheck: True
    gpgkey: https://files.zimbra.com/downloads/security/public.key
    priority: 50
    exclude: "{{ item.exclude | default(omit) }}"
  loop:
    - name: zimbra
      description: Zimbra RPM Repository
      baseurl: https://repo.zimbra.com/rpm/87/rhel$releasever
    - name: zimbra-90-oss
      description: Zimbra New RPM Repository
      baseurl: https://repo.zimbra.com/rpm/90/rhel$releasever
    - name: zimbra-90-network
      description: Zimbra NE RPM Repository
      baseurl: https://repo.zimbra.com/rpm/90-ne/rhel$releasever
      exclude:
        - zimbra-patch
  tags: repo,zcs

