Compare commits
No commits in common. "master" and "v0.1.1" have entirely different histories.
|
@ -4,6 +4,9 @@ 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"
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -8,6 +8,6 @@ gem 'rspec-puppet', :require => false
|
|||
gem 'rspec-puppet-facts', :require => false
|
||||
gem 'rake', :require => false
|
||||
# beaker related gems
|
||||
gem 'beaker-rspec', '5.6.0'
|
||||
gem 'beaker-rspec', :require => false
|
||||
gem 'serverspec', :require => false
|
||||
gem 'specinfra', :require => false
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
limesurvey::archive_path: '/tmp/limesurvey.tar.gz'
|
||||
limesurvey::dir_name: 'limesurvey'
|
||||
limesurvey::dbhost: 'localhost'
|
||||
limesurvey::download_url: 'https://github.com/LimeSurvey/LimeSurvey/archive/'
|
||||
limesurvey::version: '2.57.0+161202'
|
||||
limesurvey::install_path: '/opt/limesurvey'
|
||||
limesurvey::download_url: 'https://www.limesurvey.org/stable-release?download=1853:limesurvey2514%20160908targz'
|
||||
limesurvey::extract_path: '/opt/'
|
||||
limesurvey::manage_database: true
|
||||
limesurvey::manage_webserver: true
|
||||
limesurvey::manage_php: true
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
# Parameters
|
||||
# ----------
|
||||
#
|
||||
# * `sample parameter`
|
||||
# Explanation of what this parameter affects and what it defaults to.
|
||||
#
|
||||
# Examples
|
||||
# --------
|
||||
#
|
||||
|
@ -25,8 +28,9 @@
|
|||
#
|
||||
class limesurvey::extract (
|
||||
|
||||
String $archive_path = $limesurvey::archive_path,
|
||||
String $download_url = $limesurvey::download_url,
|
||||
String $version = $limesurvey::version,
|
||||
String $extract_path = $limesurvey::extract_path,
|
||||
String $install_path = $limesurvey::install_path,
|
||||
String $runtime_dir_mode = $limesurvey::runtime_dir_mode,
|
||||
String $www_group = $limesurvey::www_group,
|
||||
|
@ -40,32 +44,21 @@ class limesurvey::extract (
|
|||
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 -C ${install_path} --strip-components=1'",
|
||||
require => Exec['limesurvey-download'],
|
||||
user => $www_user,
|
||||
}
|
||||
|
||||
file { "/tmp/${version}.tar.gz":
|
||||
ensure => absent,
|
||||
require => Exec['limesurvey-unzip'],
|
||||
archive { $archive_path:
|
||||
ensure => present,
|
||||
extract => true,
|
||||
extract_path => $extract_path,
|
||||
source => $download_url,
|
||||
creates => "${install_path}/tmp",
|
||||
user => $www_user,
|
||||
group => $www_group,
|
||||
require => File[$install_path],
|
||||
}
|
||||
|
||||
file { "${install_path}/tmp/runtime/":
|
||||
ensure => directory,
|
||||
mode => $runtime_dir_mode,
|
||||
require => Exec['limesurvey-unzip'],
|
||||
require => File[$install_path],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,14 +7,21 @@
|
|||
# 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.
|
||||
#
|
||||
# * `version`
|
||||
# What version to download.
|
||||
# * `extract_path`
|
||||
# Target folder path to extract archive
|
||||
#
|
||||
# * `runtime_dir_mode`
|
||||
# Mode of the limesurey runtime directory. Default is 0766,
|
||||
|
@ -62,9 +69,10 @@
|
|||
#
|
||||
class limesurvey (
|
||||
|
||||
String $install_path,
|
||||
String $archive_path,
|
||||
String $dir_name,
|
||||
String $download_url,
|
||||
String $version,
|
||||
String $extract_path,
|
||||
String $runtime_dir_mode,
|
||||
String $www_group,
|
||||
String $www_user,
|
||||
|
@ -87,6 +95,7 @@ class limesurvey (
|
|||
String $webserver_class = 'limesurvey::webserver',
|
||||
String $php_class = 'limesurvey::php',
|
||||
|
||||
String $install_path = "${extract_path}${dir_name}",
|
||||
String $vhost_docroot = $install_path,
|
||||
|
||||
) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "martialblog-limesurvey",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.1",
|
||||
"author": "martialblog",
|
||||
"summary": "Installation and Configuration of Limesurvey",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -9,6 +9,7 @@
|
|||
"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"}
|
||||
|
|
Loading…
Reference in New Issue