title: How do I call yum_package without internet connection from cache only?
body: <p>Part of the machines where we run chef on have no access to a yum-repository with basic packages (like openjdk).</p>
  
  <p>In chef11 we managed to not trigger an internet connection by setting the parameters in <code>/etc/yum.conf</code>:</p>
  
  <pre><code>exclude=*
  metadata_expire=2147483647
  mirrorlist_expire=2147483647
  </code></pre>
  
  <p>In chef12, unfortunately, this is not sufficient anymore. We get an exception:</p>
  
  <pre><code>[2015-02-10T09:43:38+00:00] ERROR: yum_package[java-1.7.0-openjdk] (java::openjdk line 46) had an error: Mixlib::ShellOut::CommandTimeout: Command timed out after 900s:
  Command exceeded allowed execution time, process terminated
  ---- Begin output of /usr/bin/python /opt/chef/embedded/apps/chef/lib/chef/provider/package/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
  STDOUT: 
  STDERR: 
  ---- End output of /usr/bin/python /opt/chef/embedded/apps/chef/lib/chef/provider/package/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
  Ran /usr/bin/python /opt/chef/embedded/apps/chef/lib/chef/provider/package/yum-dump.py --options --installed-provides --yum-lock-timeout 30 returned 
  [2015-02-10T09:43:38+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
  </code></pre>
  
  <p>Is there a flag or hack to disable this call to yum-dump. We provide a basebox where the correct version of the packages is already installed?</p>
  
  <p>I looked into some cache flags but did not find anything obvious either?</p>