Adds releasever option (used by Amazon Linux) to the generated yum.conf #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As instructed in this thread: https://forums.aws.amazon.com/thread.jspa?messageID=535192 users of Amazon Linux are advised to set a custom option
releasever=latest
inyum.conf
to ensure the latest updates. I did not find a way to specify that with the current yum cookbook version.Running yum cookbook actually breaks yum dependency resolution on newly created Amazon Linux instances because by default Amazon Linux come with this special option but then running Chef removes that option and then dependency conflicts start to arise.
Note that this value does not have to be the same as that of option
distroverpkg
(which sets the variable$releasever
) - in fact settingdistroverpkg=latest
breaks things as that then generates some invalid URLs.As I understand yum plugin developers are allowed to add custom options to yum, but the current implementation of
yum.conf
doesn't allow neither to specify custom options, nor to specify a custom template to be used in place ofmain.erb
. Therefore I just added it in parallel to otheryum.conf
options.