opscode-cookbooks/yum — pull request #78 by jbasko (2014-06-04 13:45:14+00:00)
Title: Adds releasever option (used by Amazon Linux) to the generated yum.conf

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` in `yum.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 setting `distroverpkg=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 of `main.erb`. Therefore I just added it in parallel to other `yum.conf` options.