---
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Install python-xml dependency for zypper_repository
  shell: zypper install -y python-xml
  args:
    warn: false

- name: Add upstream repo(s)
  zypper_repository:
    repo: "{{ obs_repofile_url }}"
    state: present
    disable_gpg_check: true  # auto_import_keys is broken
  with_items: "{{ repos }}"

- name: Refresh all repositories
  zypper_repository:
    repo: '*'
    runrefresh: true
  failed_when: false
