How to install a RPM using Puppet from URL source

By   10-31-2017 · 1 minute read · 107 words

Here is a class that will allow you to install a RPM file from a direct URL source. This is useful if you don’t have a RPM repository server setup and just need a quick one off solution.

In this example I’m installing a telegraf rpm from a remote source.

class remoterpm ( $src ) {

  package { 'package':
    provider         => 'rpm',
    ensure      => installed,
    source => "${remoterpm::src}"

class { 'remoterpm':
  src => '',

Create a file let’s say telegraf.pp with the code above and replace the src variable with your own custom url. You can then apply this class with:

sudo /opt/puppetlabs/bin/puppet apply --debug --no-daemonize telegraf.pp

puppet   rpm  

comments powered by Disqus