---

# check backend functionality

- name: Add dummy Fedora 42 release
  command: faf releaseadd -o fedora --opsys-release 42
  become: yes
  become_user: faf
  changed_when: false

- name: Get releases from FAF
  command: faf releaselist
  become: yes
  become_user: faf
  register: release_list
  failed_when: "'Fedora 42' not in release_list.stdout"
  changed_when: false

- name: Add dummy meta_faf component to Fedora 42 release
  command: faf compadd -o fedora --opsys-release 42 meta_faf
  become: yes
  become_user: faf
  changed_when: false

- name: cpf
  copy:
    src: ureport_sample
    dest: "{{ faf_spool_dir }}/reports/incoming"
    owner: faf
    group: faf

- name: faf
  command: faf {{ item }}
  become: yes
  become_user: faf
  loop:
    - "save-reports -v"
    - "create-problems -v"
  # This task is 100% idempotent, no questions asked.
  changed_when: false
