Yum module (--nogpgcheck and undocumented conf_file option)

Hi,

a colleague asked me how to install an unsigned RPM with the Yum module. Going through the module, it doesn’t seem easy (no way to make the module add --nogpgcheck to the Yum invocation). Also, I noticed a conf_file option in the Yum file which is undocumented (so maybe this could be done with a custom Yum configuration file, but definitely not ideal).

If I added an ignoregpgcheck setting to the module, would you guys be open to merging this in? I’d document the conf_file option as a bonus. If set to yes, it would just add --nopgpcheck to the Yum install command.

Cheers

a colleague asked me how to install an unsigned RPM with the Yum module.
Going through the module, it doesn't seem easy (no way to make the module
add --nogpgcheck to the Yum invocation). Also, I noticed a conf_file option
in the Yum file which is undocumented (so maybe this could be done with a
custom Yum configuration file, but definitely not ideal).

Why is updating the yum config file a bad idea?​​ (Bear with me, I know
little of yum)
That's how I solve this with apt, btw.

If I added an ignoregpgcheck setting to the module, would you guys be open

Well, it’s fiddly and I have to remember to revert it back after I’m done installing - so it’s several tasks instead of one. If I was doing this manually I’d just use the command line argument - it’s convenient, and does exactly what I want for the exact duration I want (this one invocation). This also strikes me as a pretty common scenario, it’s not like installing in-house generated, unsigned RPMs is unheard of in software development circles. :slight_smile:

I could use the command module with RPM directly too, but instead of coming up with creative workarounds I’d just like to have my playbooks be as high-level as possible and use all the idempotent Ansible goodness I can.