fetchtool

Fetch tool to download packages

Center for Information Technology / Poland

coi

5,449 downloads

5,449 latest version

4.6 quality score

Version information

  • 1.0.0 (latest)
released Sep 6th 2017
This version is compatible with:
  • Ubuntu
    ,
    CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Debian

Start using this module

Documentation

coi/fetchtool — version 1.0.0 Sep 6th 2017

COI-fetchtool Puppet module

Allow to fetch files, in chosen by user way. By default it will utulize WGET to download files. To change the way of downloading an artifact, one should change setting - fetchtool::settings::fetch_tool, to use some other definition.

Simple example usage of fetchtool module

# Will download file to /usr/src/eicar.com
fetchtool::download { 'http://www.eicar.org/download/eicar.com': }

More complex example of fetchtool module

$baseuri = 'https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/4.2.0'
$filename = 'flyway-commandline-4.2.0-linux-x64.tar.gz'

fetchtool::download { 'alias-for-flyway-4.2.0.tgz':
  address    => "${baseuri}/${filename}",
  mode       => '0660',
  owner      => 'flyway',
  group      => 'flyway',
  fetch_dir  => '/tmp',
  filename   => 'flyway-4.2.0.tgz',
  attributes => {
    # Additional attibutes to specific implementation - in this case WGET
    'timeout'      => 1200,
    'install_wget' => true,
  }
}