{"id":15013974,"url":"https://github.com/voxpupuli/puppet-wget","last_synced_at":"2025-10-06T07:30:37.968Z","repository":{"id":65927290,"uuid":"1423903","full_name":"voxpupuli/puppet-wget","owner":"voxpupuli","description":"A puppet recipe for wget, a useful tool to download arbitary files from the web","archived":false,"fork":true,"pushed_at":"2020-09-15T13:34:54.000Z","size":221,"stargazers_count":41,"open_issues_count":23,"forks_count":113,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-01-08T06:44:28.624Z","etag":null,"topics":["bsd-puppet-module","centos-puppet-module","debian-puppet-module","freebsd-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","sles-puppet-module","ubuntu-puppet-module","windows-puppet-module"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bryanrossUK/puppet-wget","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-28T23:39:41.000Z","updated_at":"2024-10-16T21:19:43.000Z","dependencies_parsed_at":"2023-02-16T17:20:17.913Z","dependency_job_id":null,"html_url":"https://github.com/voxpupuli/puppet-wget","commit_stats":null,"previous_names":["maestrodev/puppet-wget"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-wget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-wget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-wget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-wget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-wget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234113232,"owners_count":18781885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bsd-puppet-module","centos-puppet-module","debian-puppet-module","freebsd-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","sles-puppet-module","ubuntu-puppet-module","windows-puppet-module"],"created_at":"2024-09-24T19:45:01.160Z","updated_at":"2025-10-06T07:30:32.653Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/voxpupuli/puppet-wget.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-wget)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/wget.svg)](https://forge.puppetlabs.com/puppet/wget)\n[![Puppet Forge](https://img.shields.io/puppetforge/f/puppet/wget.svg)](https://forge.puppetlabs.com/puppet/wget)\n[![Puppet Forge](https://img.shields.io/puppetforge/e/puppet/wget.svg)](https://forge.puppetlabs.com/puppet/wget)\n\nThis module is declared as deprecated by Vox Pupuli.\n\nThe module [puppet-archive](https://github.com/voxpupuli/puppet-archive) is suggested as its replacement.\n\n\nA Puppet module to download files with wget, supporting authentication.\nIt got migrated from [maestrodev](https://forge.puppet.com/maestrodev/wget) to [Vox Pupuli](https://voxpupuli.org/)\n\n### ToC\n\n* [Example](#example)\n* [Building](#building)\n* [License](#license)\n\n---\n\n## Example\n\ninstall wget:\n\n```puppet\n    include wget\n```\n\n```puppet\n    wget::fetch { \"download Google's index\":\n      source      =\u003e 'http://www.google.com/index.html',\n      destination =\u003e '/tmp/',\n      timeout     =\u003e 0,\n      verbose     =\u003e false,\n    }\n```\nor alternatively:\n\n```puppet\n    wget::fetch { 'http://www.google.com/index.html':\n      destination =\u003e '/tmp/',\n      timeout     =\u003e 0,\n      verbose     =\u003e false,\n    }\n```\n\nIf `$destination` ends in either a forward or backward slash, it will treat the destination as a directory and name the file with the basename of the `$source`.\n```puppet\n  wget::fetch { 'http://mywebsite.com/apples':\n    destination =\u003e '/downloads/',\n  }\n```\n\nDownload from an array of URLs into one directory\n```puppet\n  $manyfiles = [\n    'http://mywebsite.com/apples',\n    'http://mywebsite.com/oranges',\n    'http://mywebsite.com/bananas',\n  ]\n\n  wget::fetch { $manyfiles:\n    destination =\u003e '/downloads/',\n  }\n```\n\nThis fetches a document which requires authentication:\n\n```puppet\n    wget::fetch { 'Fetch secret PDF':\n      source      =\u003e 'https://confidential.example.com/secret.pdf',\n      destination =\u003e '/tmp/',\n      user        =\u003e 'user',\n      password    =\u003e 'p$ssw0rd',\n      timeout     =\u003e 0,\n      verbose     =\u003e false,\n    }\n```\n\nThis caches the downloaded file in an intermediate directory to avoid\nrepeatedly downloading it. This uses the timestamping (-N) and prefix (-P)\nwget options to only re-download if the source file has been updated.\n\n```puppet\n    wget::fetch { 'https://tool.com/downloads/tool-1.0.tgz':\n      destination =\u003e '/tmp/',\n      cache_dir   =\u003e '/var/cache/wget',\n    }\n```\n\nIt's assumed that the cached file will be named after the source's URL\nbasename but this assumption can be broken if wget follows some redirects. In\nthis case you must inform the correct filename in the cache like this:\n\n```puppet\n    wget::fetch { 'https://tool.com/downloads/tool-latest.tgz':\n      destination =\u003e '/tmp/tool-1.0.tgz',\n      cache_dir   =\u003e '/var/cache/wget',\n      cache_file  =\u003e 'tool-1.1.tgz',\n      execuser    =\u003e 'fileowner',\n      group       =\u003e 'filegroup',\n    }\n```\n\nChecksum can be used in the `source_hash` parameter, with the MD5-sum of the content to be downloaded.\nIf content exists, but does not match it is removed before downloading.\n\nIf you want to use your own unless condition, you can do it. This example uses wget to download the latest version of Wordpress to your destination folder only if the folder is empty (test used returns 1 if directory is empty or 0 if not).\n```puppet\n    wget::fetch { 'wordpress':\n        source      =\u003e 'https://wordpress.org/latest.tar.gz',\n        destination =\u003e \"/var/www/html/latest_wordpress.tar.gz\",\n        timeout     =\u003e 0,\n        unless      =\u003e \"test $(ls -A /var/www/html 2\u003e/dev/null)\",\n    }\n```\n\n# Building\n\nTesting is done with rspec, [Beaker-rspec](https://github.com/puppetlabs/beaker-rspec), [Beaker](https://github.com/puppetlabs/beaker))\n\nTo test and build the module\n\n    bundle install\n    # run specs\n    rake\n\n    # run Beaker system tests with vagrant vms\n    rake beaker\n    # to use other vm from the list spec/acceptance/nodesets and not destroy the vm after the tests\n    BEAKER_destroy=no BEAKER_set=centos-65-x64-docker bundle exec rake beaker\n\n    # Release the Puppet module to the Forge, doing a clean, build, tag, push, bump_commit and git push\n    rake module:release\n\n# License\n\nCopyright 2011-2013 MaestroDev\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-wget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-wget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-wget/lists"}