Update repositories before performing upgrades

To ensure the most up to date packages are getting installed during an
upgrade, ensure we rum `yum makecache` or `apt-get update` to update the
repository information first.

Issue rcbops/chef-cookbooks#870

(cherry picked from commit 47ee1c17158d90107b0d8cbcdb5688236788fd97)