add support for "source" attributes to chef-ingredient #152
Labels
Status: Good First Issue
An issue ready for a new contributor.
Status: Help Wanted
An issue that needs help from a contributor.
Cookbook version
5.5.1
Chef-client version
any (we support 12 and 13 internally)
Platform Details
CentOS (any)
Scenario:
We need to be able to specify the location that the Chef RPMs come from. Supplying a "repo" cookbook is not sufficient as we are not installing from repos.
Steps to Reproduce:
I was able to solve my issue by using
edit_resource!
, however, this feels like it's prone to failure... and could make debugging hard:Expected Result:
What I would like to see is a method of passing the source RPM to the appropriate blocks. For instance, I was thinking instead of passing a hash of
package => version
you could pass apackage => config_hash
such that:Becomes:
Then this could be consumed by updating
recipes/addons.rb
toI think this approach provides the most obvious method of configuration, however, it comes at a cost of backwards incompatibility...
The other solution I was thinking was we could add some logic to
recipes/addons.rb
This would be less clean, but would be backwards compatible... I also question if there are other sources, i.e. if you could feed
package_source
just/path/to/chef-manage.rpm
instead offile://path/to/chef-manage.rpm
(which would make my regex invalid...)Actual Result:
I'm more than happy to write the patch and open a pull reuqest, but wanted some feedback from the Chef folks as to which approach would be the more appropriate/most likely to get pulled.
Thanks!
-Q
The text was updated successfully, but these errors were encountered: