title: rpm and Yum don't believe a package is installed after Chef installs
body: <p>Running chef-solo (Installing Chef Omnibus (12.3)) on centos6.6</p>
  
  <p>My recipe has the following simple code:</p>
  
  <pre><code>package 'cloud-init' do
      action :install
  end 
  log 'rpm-qi' do
      message `rpm -qi cloud-init`
      level :warn
  end
  log 'yum list' do
      message `yum list cloud-init`
      level :warn
  end
  </code></pre>
  
  <p>But it outputs the following:</p>
  
  <pre><code>       - install version 0.7.5-10.el6.centos.2 of package cloud-init
  
       * log[rpm-qi] action write[2015-07-16T16:46:35+00:00] WARN: package cloud-init is not installed
  
  [2015-07-16T16:46:35+00:00] WARN: Loaded plugins: fastestmirror, presto
     Available Packages
     cloud-init.x86_64                  0.7.5-10.el6.centos.2                 extras
  </code></pre>
  
  <p>I am at a loss as to why rpm/yum and actually rpmquery don't see the package as installed.</p>
  
  <p>EDIT: To clarify I am specifically looking for the following string post package install to then apply a change to the file (I understand this is not a very chef way to do something I am happy to accept suggestions):</p>
  
  <pre><code>rpmquery -l cloud-init | grep 'distros/__init__.py$'
  </code></pre>
  
  <p>I have found that by using the following:</p>
  
  <pre><code>install_report =  shell_out('yum install -y cloud-init').stdout 
  cloudinit_source = shell_out("rpmquery -l cloud-init | grep 'distros/__init__.py$'").stdout
  </code></pre>
  
  <p>I can then get the file I am looking for and perform</p>
  
  <pre><code>Chef::Util::FileEdit.new(cloudinit_source.chomp(''))
  </code></pre>
  
  <p>The file moves based on the distribution but I need to edit that file specifically with in place changes.</p>