Forge Home

http_download

Contains a type that allows simple http downloads via ruby.

12,329 downloads

6,926 latest version

4.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.8 (latest)
  • 0.1.7
  • 0.1.6
  • 0.1.5 (deleted)
  • 0.1.4
  • 0.1.3 (deleted)
  • 0.1.2 (deleted)
released Jan 15th 2017
This version is compatible with:
  • Windows, RedHat, Ubuntu, Debian, CentOS

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'sledge-http_download', '0.1.8'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add sledge-http_download
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install sledge-http_download --version 0.1.8

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

sledge/http_download — version 0.1.8 Jan 15th 2017

http_download

Overview

This module contains a puppet type that allows http downloads directly via ruby. No additional executables are needed. It supports SSL and Basic authentication.

Class: http_download

The class of that module just acts as test and example showing how to use the type.

Sample Usage

download {'test file 1':
    uri  => 'http://downloads.sourceforge.net/project/sevenzip/7-Zip/9.22/7z922.exe',
    dest => '/tmp/7z922.exe'
}

download { 'my ssl and basic auth download':
    uri  => 'https://www.example.com/download/example.txt',
    dest => '/tmp/example.txt',
    user => 'user',
    pass => 'pass'
}

download {'download if not exists':
    uri   => 'http://downloads.sourceforge.net/project/sevenzip/7-Zip/9.22/7z922.exe',
    force => false,
    dest  => '/tmp/7z922.exe'
}
        
download { 'download a file and maintain backup of old version with .bak suffix':
    uri  => 'http://www.example.com/download/example.txt',
    dest => '/tmp/example.txt',
    backupsuffix => '.bak'
}

download { 'download with basic auth and ssl, ssl forced':
    uri     => 'http://host.com:8443/test.txt',
    use_ssl => true,
    dest    => '/tmp/example.txt',
    user    => 'user',
    pass    => 'pass'
}

download { 'download with proxy settings without auth':
    uri         => 'http://host.com:8443/test.txt',
    dest        => '/tmp/example.txt',
    proxy_host  => '127.0.0.1',
    proxy_port  => '3128'
}

download { 'download with proxy setting with auth':
    uri         => 'http://host.com:8443/test.txt',
    dest        => '/tmp/example.txt',
    proxy_host  => '127.0.0.1',
    proxy_port  => '3128',
    proxy_user  => 'my-proxy-user',
    proxy_pass  => 'my-proxy-pass'
}

Supported OSes

As it's written in plain ruby all OS that can run Puppet should be able to use it. I have tested it on different Windows versions and various Linux distributions (CentOS, Ubuntu, AmazonLinux) without issues.