inspec icon indicating copy to clipboard operation
inspec copied to clipboard

yum resource should support all configurable yum repo settings

Open haidangwa opened this issue 4 years ago • 2 comments

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

haidangwa avatar Aug 03 '20 23:08 haidangwa

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

Schwad avatar Aug 04 '20 10:08 Schwad

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.

stale[bot] avatar Jan 09 '22 06:01 stale[bot]