This explains how to prevent a "yum update" from clobbering an "omnibus" Chef installation

The normal procedure for installing Chef is to install the latest Chef tools from Opscode, independently of the rpm / yum repositories. (This gives you a more recent version that the Chef tools than you would get if you installed the "rubygem-chef" from the repos.  Especially if you are using a LTS system.)

Unfortunately, if you install Chef that way, when you run "yum update" (or similar), yum will "update" Chef to the latest version from its repo.  That is typically, very old. To prevent this happening:

  1. Run "sudo yum check-updates" to see if yum would attempt to update Chef.

  2. If it would, then identify the repo from which the "rubygem-chef" package would be installed.

  3. Edit the corresponding repo config file (in /etc/yum.repos.d/) to add an exclude for the package; e.g.

     exclude = rubygem-chef

  4. Run "sudo yum check-updates" again to check that you have successfully excluded the package.

If you are coming to this after having clobbered your Chef installation, my experience is that simply rerunning the Chef omnibus installation step is sufficient to fix things.