inspec
inspec copied to clipboard
yum resource should support all configurable yum repo settings
Detailed Description
Currently, the yum.repo
resource supports only a handful of possible yum configuration properties. This is a very limited short list of properties to check. Can we support all of the configurable properties in a yum repo configuration file?
Context
I found that username
and password
are not supported by the inspec yum.repo
resource, but these are both valid configuration items in a yum configuration stanza.
× YumRepo chef-stable username
undefined method `username' for #<Inspec::Resources::YumRepo:0x00007f962179e258>
× YumRepo chef-stable password
undefined method `password' for #<Inspec::Resources::YumRepo:0x00007f962179e258>
For yum repositories that require authentication credentials, I need to be able to test this with inspec.
Possible Implementation
Thanks for filing this issue @haidangwa !
I wonder if a PR to this affect could just add these here on the Yum resource?
https://github.com/inspec/inspec/blob/7bf8e9b6e58836809906224ff1b1d24648db731a/lib/inspec/resources/yum.rb#L142-L156
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.