Forge Home

download_and_do

Download a file from somewhere and do something with it (eg run...)

12,631 downloads

6,448 latest version

1.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

  • 0.9.2 (latest)
  • 0.9.1
  • 0.9.0
  • 0.8.0
  • 0.7.0
  • 0.6.0
  • 0.5.0
  • 0.4.0
  • 0.3.0
  • 0.2.0
  • 0.1.0
released Aug 28th 2018

Start using this module

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

Add this module to your Puppetfile:

mod 'geoffwilliams-download_and_do', '0.9.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add geoffwilliams-download_and_do
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install geoffwilliams-download_and_do --version 0.9.2

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

geoffwilliams/download_and_do — version 0.9.2 Aug 28th 2018

download_and_do

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  3. Limitations - OS compatibility, etc.
  4. Development - Guide for contributing to the module

Description

Download files using puppet-archive, then either run directly or unpack and run a command.

Usage

Download, Extract, Run

include download_and_do
download_and_do::extract_and_run { "test.tar.gz":
  source       => "http://blah/cut/spec/fixtures/test.tar.gz",
  run_relative => "cp test.txt /extract_and_run",
}

Download from source to title, then perform the command at run_relative. Pass the creates parameter to specify the presence of a file that means that the resource is already converged.

Local filename is a unique relative path within download and do download directory /var/cache/download_and_do.

Download, Run

include download_and_do
download_and_do::run { "test.sh":
  source => "http://blah/cut/spec/fixtures/test.sh"
}

Download from source to title, then make the local file executable and run it. Pass the creates parameter to specify the presence of a file that means that the resource is already converged.

Local filename is a unique relative path within download and do download directory /var/cache/download_and_do.

Limitations

  • Requires the puppet archive module
  • You may encounter errors with download_and_do::extract_and_run on windows due to shell quoting

Development

PRs accepted :)

Testing

This module supports testing using PDQTest.

Test can be executed with:

bundle install
bundle exec pdqtest all

See .travis.yml for a working CI example