GithubHelp home page GithubHelp logo

ekohl / puppet-download_file Goto Github PK

View Code? Open in Web Editor NEW

This project forked from voxpupuli/puppet-download_file

0.0 1.0 0.0 211 KB

Puppet define created that can be used to download files rather than needing to store binaries in puppet repos

Home Page: https://forge.puppet.com/puppet/download_file

License: MIT License

Dockerfile 1.34% Ruby 82.32% Puppet 10.91% HTML 5.43%

puppet-download_file's Introduction

Download File module for Puppet

Build Status Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores

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

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.

Beginning with download_file

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',
      proxy_address         => '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

Reference

Defined Types

Public Types

  • download_file: Download a give file

Parameters

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.

user

The optional userid is used when authenticating via Basic Auth with the server. user and password must be specified or this has no effect.

password

The optional password is used when authenticating via Basic Auth with the server. user and password must be specified or this has no effect.

proxy_address

The optional http proxy address to use when downloading the file

proxy_user

The optional http proxy user to use when downloading the file. proxy_address and proxy_password must be specified or this has no effect.

proxy_password

The optional http proxy password to use when downloading the file. proxy_address and proxy_user must be specified or this has no effect. By default this value accepts secure strings. A secure string is (unfortunately) tied to the machine that it is used for. To generate a secure string for a given machine, users should run the following powershell command on that machine (replacing PASSWORD with the desired password):

ConvertFrom-SecureString -securestring $(ConvertTo-SecureString "PASSWORD" -AsPlainText -Force)

It is possible to get this information then clear the command from history, but it's important to note that the -Force argument is there to suppress warnings that the plaintext password is in the history.

If this process sounds unappealing, you can send the password in plaintext (which sits in the download-<filename>.ps1 file on the machine being provisioned) by changing the is_password_secure variable to false.

is_password_secure

The optional switch to change the way that proxyPassword is interpreted from secure string to plaintext. This will send the password in plaintext to the machine being provisioned, which may be a security concern.

cookies

An optional array of cookies to add to the HTTP request for the download.

Limitations

This module is tested on the following platforms:

  • Windows 2008
  • Windows 2008 R2
  • Windows 2012
  • Windows 2012 R2
  • Windows 7
  • Windows 8

It is tested with the OSS version of Puppet only.

Contributing

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

puppet-download_file's People

Contributors

bastelfreak avatar liamjbennett avatar stack72 avatar dhoppe avatar ffrank avatar juniorsysadmin avatar igalic avatar alexjfisher avatar anovitskiy avatar bcatlin avatar tragiccode avatar wyardley avatar vinzent avatar ofalk avatar llowder avatar davidjfelix avatar bbriggs avatar noma4i avatar aadamovich avatar devcfgc avatar elvenspellmaker avatar ekohl avatar garethr avatar hunner avatar jyaworski avatar sandra-thieme avatar scottpecnik avatar nibalizer avatar sacres avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.