--- - name: Include RedHat General Repo Init include_tasks: redhat-general-repo.yml - name: Enable {{ ansible_distribution }} Modules shell: dnf module enable -y "{{dnf_module}}" with_items: - "{{ dnf_modules }}" loop_control: index_var: item_index loop_var: dnf_module become: true when: - dnf_modules is defined - name: Include RedHat Family Common Tasks include_tasks: redhat.yml