http_download

contributions requested
Contains a type that allows simple http downloads via ruby.

12,601 downloads

7,070 latest version

4.3 quality score

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

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 16th 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 16th 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.