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. -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/2f7007e4-9554-4255-be38-f5bd668b48cfn%40googlegroups.com.
[centos@localhost tmp]$ grep "localpkg_gpgcheck" /etc/dnf/dnf.conf localpkg_gpgcheck=0 [centos@localhost tmp]$ ls -la /etc/yum.conf lrwxrwxrwx. 1 root root 12 Sep 17 15:05 /etc/yum.conf -> dnf/dnf.conf [centos@localhost tmp]$ cat playbook.yml --- - hosts: all connection: local become: true vars: ansible_user: centos tasks: - name: Install local package yum: name: /tmp/cloud-init-vmware-guestinfo-1.1.0-1.el7.noarch.rpm state: latest [centos@localhost tmp]$ ansible-playbook -i localhost, playbook.yml PLAY [all] ************************************************************************************************************************* TASK [Gathering Facts] ************************************************************************************************************* ok: [localhost] TASK [Install local package] ******************************************************************************************************* fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to validate GPG signature for cloud-init-vmware-guestinfo-1.1.0-1.el7.noarch"} PLAY RECAP ************************************************************************************************************************* localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0