Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Commit f63e3aa

Browse files
author
Johannes Graf
committed
Fixed prerequisites fuckup and some changes
1 parent 3777199 commit f63e3aa

File tree

6 files changed

+38
-16
lines changed

6 files changed

+38
-16
lines changed

.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source 'https://rubygems.org'
2-
puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['~> 3.2.0']
2+
puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['~> 3.7.0']
33

44
gem 'puppet', puppetversion
55

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
/metadata.json
21
/.project

Modulefile

Lines changed: 0 additions & 8 deletions
This file was deleted.

manifests/init.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
# - *$username: set basic auth username
2121
# - *$password: set basic auth password
2222
# - *$proxy: HTTP proxy in the form of "hostname:port"; e.g. "myproxy:8080"
23-
# - *$dependency_class: Puppet class which installs the required programs (curl, tar, unzip)
2423
# - *$exec_path: Path being searched for all Exec resources, default: ['/usr/local/bin', '/usr/bin', '/bin']
2524
#
2625
# Example usage:
@@ -56,9 +55,10 @@
5655
$username = undef,
5756
$password = undef,
5857
$proxy = undef,
59-
$dependency_class = Class['archive::prerequisites'],
6058
$exec_path = ['/usr/local/bin', '/usr/bin', '/bin']) {
6159

60+
ensure_resource('class', 'archive::prerequisites',{})
61+
6262
archive::download {"${name}.${extension}":
6363
ensure => $ensure,
6464
url => $url,
@@ -73,7 +73,7 @@
7373
username => $username,
7474
password => $password,
7575
proxy => $proxy,
76-
require => $dependency_class,
76+
require => Class['archive::prerequisites'],
7777
exec_path => $exec_path,
7878
}
7979

manifests/prerequisites.pp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@
1212
$packages = [ 'curl', 'unzip', 'tar', ]
1313

1414
# install additional packages if missing
15-
package { $packages:
16-
ensure => installed,
17-
}
15+
ensure_packages($packages, {ensure => installed})
1816
}

metadata.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "gini-archive",
3+
"version": "0.2.0",
4+
"author": "Jochen Schalanda",
5+
"summary": "Puppet module to download and extract tar and zip archives",
6+
"license": "Apache 2.0",
7+
"source": "https://github.com/gini/puppet-archive",
8+
"project_page": "https://github.com/gini/puppet-archive",
9+
"issues_url": "https://github.com/gini/puppet-archive/issues",
10+
"tags": [
11+
"tar", "curl", "unzip", "download", "extract", "archive"
12+
],
13+
"operatingsystem_support": [
14+
{
15+
"operatingsystem": "Debian",
16+
"operatingsystemrelease": [
17+
"7.6"
18+
]
19+
}
20+
],
21+
"requirements": [
22+
{
23+
"name": "puppet",
24+
"version_requirement": "3.7"
25+
}
26+
],
27+
"dependencies": [
28+
{
29+
"name": "puppetlabs-stdlib",
30+
"version_requirement": ">= 4.0.0"
31+
}
32+
]
33+
}

0 commit comments

Comments
 (0)