---
- name: "Add {{ app_name }}'s yum repository"
  yum_repository:
    baseurl: "{{ bandwhich_rpm_repository }}"
    description: "{{ app_name }}'s repository"
    gpgcheck: true
    gpgkey: "{{ bandwhich_rpm_key }}"
    name: "{{ app_name | lower | replace(' ', '-') }}"

- name: "Ensure {{ app_name }} is installed"
  dnf:
    name: bandwhich
    state: "{{ app_state | default('present') }}"
    update_cache: "{{ omit if skip_package_cache_update is defined else 'true' }}"
