title: Custom fact should run after a package is installed
body: <p>I have a small custom fact in a my php module</p>
  
  <pre><code>Facter.add('php_extension_version') do
    setcode do
      Facter::Core::Execution.exec("php -i | awk '/^PHP Extension =&gt;/ { print $4}'") || nil
    end
  end
  </code></pre>
  
  <p>This obviously requires the php binary to be installed. However, I noticed that all facts are run once before applying the catalog, so this fact is invalid before php installed.</p>
  
  <p>Is there any way of gathering the information <em>after</em> the module is installed? Is there perhaps another way of exposing this information except facter?</p>
  
  <p><em>Update</em></p>
  
  <p>I'm using the two facts to determine which of multiple .so files is the right one to install:</p>
  
  <pre><code>if $php_zts_enabled {
      $so_name = "newrelic-$php_extension_version.so"
  } else {
      $so_name = "newrelic-$php_extension_version-zts.so"
  }
  
  file {"/usr/lib64/php5/extensions/newrelic.so":
      source =&gt; "file:///opt/newrelic-php5-$version-linux/agent/x64/$so_name",
      owner  =&gt; root,
      group  =&gt; root,
      mode   =&gt; 0644,
      notify =&gt; Service['apache'],
      require =&gt; Exec["extract-php-agent-$version"]
  }
  </code></pre>
  
  <p>The files that are located in the agent/x64 directory can be</p>
  
  <pre><code>newrelic-20060613.so      newrelic-20090626-zts.so  newrelic-20121212.so      newrelic-20131226-zts.so
  newrelic-20060613-zts.so  newrelic-20100525.so      newrelic-20121212-zts.so
  newrelic-20090626.so      newrelic-20100525-zts.so  newrelic-20131226.so
  </code></pre>