Change download URL to GitHub so it won't change all the time

This commit is contained in:
Markus Opolka 2016-09-21 14:45:23 +02:00
parent cabab82dff
commit 3454de6d47
5 changed files with 39 additions and 37 deletions

View File

@ -4,9 +4,6 @@ fixtures:
stdlib:
ref: "4.12.0"
repo: "https://github.com/puppetlabs/puppetlabs-stdlib"
archive:
ref: "v1.1.1"
repo: "https://github.com/voxpupuli/puppet-archive"
mysql:
ref: "3.8.0"
repo: "http://github.com/puppetlabs/puppetlabs-mysql"

View File

@ -1,9 +1,8 @@
---
limesurvey::archive_path: '/tmp/limesurvey.tar.gz'
limesurvey::dir_name: 'limesurvey'
limesurvey::dbhost: 'localhost'
limesurvey::download_url: 'https://www.limesurvey.org/stable-release?download=1853:limesurvey2514%20160908targz'
limesurvey::extract_path: '/opt/'
limesurvey::download_url: 'https://github.com/LimeSurvey/LimeSurvey/archive/'
limesurvey::version: '2.51.4_160908'
limesurvey::install_path: '/opt/limesurvey'
limesurvey::manage_database: true
limesurvey::manage_webserver: true
limesurvey::manage_php: true

View File

@ -6,9 +6,6 @@
# Parameters
# ----------
#
# * `sample parameter`
# Explanation of what this parameter affects and what it defaults to.
#
# Examples
# --------
#
@ -28,9 +25,8 @@
#
class limesurvey::extract (
String $archive_path = $limesurvey::archive_path,
String $download_url = $limesurvey::download_url,
String $extract_path = $limesurvey::extract_path,
String $version = $limesurvey::version,
String $install_path = $limesurvey::install_path,
String $runtime_dir_mode = $limesurvey::runtime_dir_mode,
String $www_group = $limesurvey::www_group,
@ -44,21 +40,41 @@ class limesurvey::extract (
group => $www_group,
}
archive { $archive_path:
ensure => present,
extract => true,
extract_path => $extract_path,
source => $download_url,
creates => "${install_path}/tmp",
user => $www_user,
group => $www_group,
exec { 'limesurvey-download':
path => '/bin:/usr/bin',
creates => "${install_path}/tmp/runtime",
command => "bash -c 'cd /tmp; wget ${download_url}${version}.tar.gz'",
require => File[$install_path],
user => $www_user,
}
exec { 'limesurvey-unzip':
path => '/bin:/usr/bin',
cwd => '/tmp',
creates => "${install_path}/tmp/runtime",
command => "bash -c 'cd /tmp; tar zxf /tmp/${version}.tar.gz'",
require => Exec['limesurvey-download'],
user => $www_user,
}
exec { 'limesurvey-copy':
path => '/bin:/usr/bin',
cwd => '/tmp',
creates => "${install_path}/tmp/runtime",
command => "bash -c 'cp -rf /tmp/LimeSurvey-${version}/* ${install_path}'",
require => Exec['limesurvey-unzip'],
user => $www_user,
}
file { "/tmp/${version}.tar.gz":
ensure => absent,
require => Exec['limesurvey-copy'],
}
file { "${install_path}/tmp/runtime/":
ensure => directory,
mode => $runtime_dir_mode,
require => File[$install_path],
require => Exec['limesurvey-copy'],
}
}

View File

@ -7,21 +7,14 @@
# Parameters
# ----------
#
# * `archive_path`
# Name of path to extract to
#
# * `dir_name`
# Name of directory to extract to
#
# * `install_path`
# Combination of archive_path and dir_name
#
# * `download_url`
# Where to download the limesurey code from.
# Note: They seem to change that quite often. Be aware.
#
# * `extract_path`
# Target folder path to extract archive
# * `version`
# What version to download.
#
# * `runtime_dir_mode`
# Mode of the limesurey runtime directory. Default is 0766,
@ -69,10 +62,9 @@
#
class limesurvey (
String $archive_path,
String $dir_name,
String $install_path,
String $download_url,
String $extract_path,
String $version,
String $runtime_dir_mode,
String $www_group,
String $www_user,
@ -95,7 +87,6 @@ class limesurvey (
String $webserver_class = 'limesurvey::webserver',
String $php_class = 'limesurvey::php',
String $install_path = "${extract_path}${dir_name}",
String $vhost_docroot = $install_path,
) {

View File

@ -1,6 +1,6 @@
{
"name": "martialblog-limesurvey",
"version": "0.1.1",
"version": "0.1.2",
"author": "martialblog",
"summary": "Installation and Configuration of Limesurvey",
"license": "Apache-2.0",
@ -9,7 +9,6 @@
"issues_url": "https://github.com/martialblog/puppet-limesurvey/issues",
"dependencies": [
{"name":"puppetlabs-stdlib","version_requirement":">= 1.0.0"},
{"name":"puppet-archive","version_requirement":">= 1.1.1"},
{"name":"puppetlabs-concat","version_requirement":">= 2.2.0"},
{"name":"puppetlabs-apache","version_requirement":">= 1.10.0"},
{"name":"puppetlabs-mysql","version_requirement":">= 3.8.0"}