I ran into a problem that I think is a bug, but I saw that I should bring it up as a question on the mailing list first. So, my question is, is it expected behavior for ansible.builtin.package, ansible.builtin.yum and ansible.builtin.dnf to ignore the localpkg_gpgcheck setting in /etc/dnf/dnf.conf?
On CentOS 7, the package module and the yum module both honor the localpkg_gpgcheck setting in /etc/yum.conf. If you set it to 0, you can install unsigned packages from a file using the package module (which doesn't have a disable_gpg_check option).
On CentOS 8, these modules appear to ignore the localpkg_gpgcheck setting in /etc/dnf/dnf.conf (which is soft linked to /etc/yum.conf).
Attached is a minimal example of the behavior...
If I just dnf install the RPM, it works like a charm.