> One of my patrons pointed out that I need to use Ansible conditionals in order to prevent these same commands from running over and over.
Yes-ish. As I'm pretty sure OP figured out due to the pre-made roles comment, there exists a `community.general.dnf_config_manager` module that would handle this specific issue. As a general rule in Ansible, as ansible-lint [0] will tell you, is if you're using `ansible.builtin.{command, shell}`, there's a decent chance you're Doing It Wrong (TM).
The biggest problem I have with Ansible (and I say this as someone who uses it extensively with Packer to build VM templates for Proxmox in my homelab) is that, like its underlying Python, there are a dozen ways to do anything. For example, if you wanted to perform a set of tasks depending on arbitrary conditions, you could:
0. Use `when` and rely on things like named host groups
1. Use `when` and rely on manually handling state throughout plays
2. Use handlers
3. Break down the tasks into logically-scoped roles, and manually call roles
4. Do #3, but rely on Ansible's role dependencies instead
5. Use semaphore files / `creates` as OP did
6. Probably something else