title: How can i install a local rpm using puppet
body: <p>I am trying to install a particular rpm using puppet, my init.pp is:</p>
  
  <pre><code>class nmap {
    package {'nmap':
      provider =&gt; 'rpm',
      source =&gt; "&lt;Local PATH to the RPM&gt;",
    }
  }
  </code></pre>
  
  <p>and the rpm is in <code>...modules/nmap/files</code></p>
  
  <p>If i move the rpm to manifests, and provide the rpm name in source => ''</p>
  
  <pre><code>class nmap {
    package {'nmap':
      provider =&gt; 'rpm',
      source =&gt; "rpm-name.rpm",
    }
  }
  </code></pre>
  
  <p>it works, but how can i specify source path with <code>../files/</code> and do puppet apply successfully</p>
  
  <p>When i use : </p>
  
  <p><code>source =&gt; 'puppet:///files/nmap-6.45-1.x86_64.rpm',</code></p>
  
  <p>i get an error:</p>
  
  <p><code>Debug: Executing '/bin/rpm -i puppet:///files/nmap-6.45-1.x86_64.rpm'</code>
  <code>Error: Execution of '/bin/rpm -i puppet:///files/nmap-6.45-1.x86_64.rpm' returned 1: error: open of puppet:///files/nmap-6.45-1.x86_64.rpm failed: No such file or directory</code></p>
  
  <p><code>Error: /Stage[main]/Nmap/Package[nmap]/ensure: change from absent to present failed: Execution of '/bin/rpm -i puppet:///files/nmap-6.45-1.x86_64.rpm' returned 1: error: open of puppet:///files/nmap-6.45-1.x86_64.rpm failed: No such file or directory</code>
  `</p>
  
  <p>when running the command:</p>
  
  <p><code>sudo puppet apply --modulepath=/home/user1/qa/puppet_qa/modules/ -e "include nmap" --debug</code></p>