--- - name: Check if EPEL repo is already configured. stat: path: "{{ epel_repofile_path }}" register: epel_repofile_result - name: Import EPEL GPG key. rpm_key: key: "{{ epel_repo_gpg_key_url }}" state: present register: result until: result is succeeded retries: 5 delay: 10 when: not epel_repofile_result.stat.exists ignore_errors: "{{ ansible_check_mode }}" - name: Install EPEL repo. yum: name: "{{ epel_repo_url }}" state: present register: result until: result is succeeded retries: 5 delay: 10 when: not epel_repofile_result.stat.exists - name: Disable Main EPEL repo. ini_file: path: "/etc/yum.repos.d/epel.repo" section: epel option: enabled value: "{{ epel_repo_disable | ternary(0, 1) }}" no_extra_spaces: true mode: 0644 - name: Install soft from EPEL ansible.builtin.dnf: name: - screen - unrar - htop - btop state: present