Forge Home

download_file

A module that will download files for use on Windows servers. Requires the server to have PowerShell 2.0 and above

865,336 downloads

23,364 latest version

3.9 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

  • 4.0.0 (latest)
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.1.0
  • 2.0.0
  • 1.3.0
  • 1.2.1
released Apr 17th 2015
This version is compatible with:

Start using this module

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

Add this module to your Puppetfile:

mod 'puppet-download_file', '1.2.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-download_file
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-download_file --version 1.2.1

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

puppet/download_file — version 1.2.1 Apr 17th 2015

puppet-download_file

####Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with download_file
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

##Overview The download_file module allows you to download files on Windows

Build Status

##Module Description

The download_file module introduced a small define download_file that will allow you to download a file over http(s) for usage during an installation. This was created because the package resource does not support http as a source for packages. It is only supported on Windows.

##Setup ###What download_file affects

  • Downloads files onto each node

###Setup Requirements

  • download_file makes use of Powershell so you will need to have at least version 2.0 installed in order to use this module.

##Begining

To download dotnet 4.0

    download_file { "Download dotnet 4.0" :
      url                   => 'http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe',
      destination_directory => 'c:\temp'
    }

To download dotnet 4.0 using a proxy

    download_file { "Download dotnet 4.0" :
      url                   => 'http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe',
      destination_directory => 'c:\temp',
      proxyAddress          => 'http://corporateproxy.net:8080'
    }

The proxy will be used as part of the download using PowerShell. This does not set a system wide proxy

##Usage

###Classes and Defined Types

####Defined Type: download_file

Parameters within download_file: #####url The http(s) destination of the file that you are looking to download

#####destination_directory The full path to the directory on the system where the file will be downloaded to

#####destination_file The optional name of the file to download onto the system.

#####proxyAddress The optional http proxy address to use when downloading the file

##Reference

###Defined Types ####Public Types

##Limitations

This module is tested on the following platforms:

  • Windows 2008
  • Windows 2008 R2
  • Windows 2012
  • Windows 2012 R2

It is tested with the OSS version of Puppet only.

###Contributing

Please read CONTRIBUTING.md for full details on contributing to this project.