Compare commits
No commits in common. "master" and "v0.1.1" have entirely different histories.
|
@ -4,6 +4,9 @@ fixtures:
|
||||||
stdlib:
|
stdlib:
|
||||||
ref: "4.12.0"
|
ref: "4.12.0"
|
||||||
repo: "https://github.com/puppetlabs/puppetlabs-stdlib"
|
repo: "https://github.com/puppetlabs/puppetlabs-stdlib"
|
||||||
|
archive:
|
||||||
|
ref: "v1.1.1"
|
||||||
|
repo: "https://github.com/voxpupuli/puppet-archive"
|
||||||
mysql:
|
mysql:
|
||||||
ref: "3.8.0"
|
ref: "3.8.0"
|
||||||
repo: "http://github.com/puppetlabs/puppetlabs-mysql"
|
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 'rspec-puppet-facts', :require => false
|
||||||
gem 'rake', :require => false
|
gem 'rake', :require => false
|
||||||
# beaker related gems
|
# beaker related gems
|
||||||
gem 'beaker-rspec', '5.6.0'
|
gem 'beaker-rspec', :require => false
|
||||||
gem 'serverspec', :require => false
|
gem 'serverspec', :require => false
|
||||||
gem 'specinfra', :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::dbhost: 'localhost'
|
||||||
limesurvey::download_url: 'https://github.com/LimeSurvey/LimeSurvey/archive/'
|
limesurvey::download_url: 'https://www.limesurvey.org/stable-release?download=1853:limesurvey2514%20160908targz'
|
||||||
limesurvey::version: '2.57.0+161202'
|
limesurvey::extract_path: '/opt/'
|
||||||
limesurvey::install_path: '/opt/limesurvey'
|
|
||||||
limesurvey::manage_database: true
|
limesurvey::manage_database: true
|
||||||
limesurvey::manage_webserver: true
|
limesurvey::manage_webserver: true
|
||||||
limesurvey::manage_php: true
|
limesurvey::manage_php: true
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
# Parameters
|
# Parameters
|
||||||
# ----------
|
# ----------
|
||||||
#
|
#
|
||||||
|
# * `sample parameter`
|
||||||
|
# Explanation of what this parameter affects and what it defaults to.
|
||||||
|
#
|
||||||
# Examples
|
# Examples
|
||||||
# --------
|
# --------
|
||||||
#
|
#
|
||||||
|
@ -25,8 +28,9 @@
|
||||||
#
|
#
|
||||||
class limesurvey::extract (
|
class limesurvey::extract (
|
||||||
|
|
||||||
|
String $archive_path = $limesurvey::archive_path,
|
||||||
String $download_url = $limesurvey::download_url,
|
String $download_url = $limesurvey::download_url,
|
||||||
String $version = $limesurvey::version,
|
String $extract_path = $limesurvey::extract_path,
|
||||||
String $install_path = $limesurvey::install_path,
|
String $install_path = $limesurvey::install_path,
|
||||||
String $runtime_dir_mode = $limesurvey::runtime_dir_mode,
|
String $runtime_dir_mode = $limesurvey::runtime_dir_mode,
|
||||||
String $www_group = $limesurvey::www_group,
|
String $www_group = $limesurvey::www_group,
|
||||||
|
@ -40,32 +44,21 @@ class limesurvey::extract (
|
||||||
group => $www_group,
|
group => $www_group,
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { 'limesurvey-download':
|
archive { $archive_path:
|
||||||
path => '/bin:/usr/bin',
|
ensure => present,
|
||||||
creates => "${install_path}/tmp/runtime",
|
extract => true,
|
||||||
command => "bash -c 'cd /tmp; wget ${download_url}${version}.tar.gz'",
|
extract_path => $extract_path,
|
||||||
require => File[$install_path],
|
source => $download_url,
|
||||||
user => $www_user,
|
creates => "${install_path}/tmp",
|
||||||
}
|
user => $www_user,
|
||||||
|
group => $www_group,
|
||||||
exec { 'limesurvey-unzip':
|
require => File[$install_path],
|
||||||
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'],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "${install_path}/tmp/runtime/":
|
file { "${install_path}/tmp/runtime/":
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => $runtime_dir_mode,
|
mode => $runtime_dir_mode,
|
||||||
require => Exec['limesurvey-unzip'],
|
require => File[$install_path],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,14 +7,21 @@
|
||||||
# Parameters
|
# Parameters
|
||||||
# ----------
|
# ----------
|
||||||
#
|
#
|
||||||
|
# * `archive_path`
|
||||||
|
# Name of path to extract to
|
||||||
|
#
|
||||||
|
# * `dir_name`
|
||||||
|
# Name of directory to extract to
|
||||||
|
#
|
||||||
# * `install_path`
|
# * `install_path`
|
||||||
# Combination of archive_path and dir_name
|
# Combination of archive_path and dir_name
|
||||||
#
|
#
|
||||||
# * `download_url`
|
# * `download_url`
|
||||||
# Where to download the limesurey code from.
|
# Where to download the limesurey code from.
|
||||||
|
# Note: They seem to change that quite often. Be aware.
|
||||||
#
|
#
|
||||||
# * `version`
|
# * `extract_path`
|
||||||
# What version to download.
|
# Target folder path to extract archive
|
||||||
#
|
#
|
||||||
# * `runtime_dir_mode`
|
# * `runtime_dir_mode`
|
||||||
# Mode of the limesurey runtime directory. Default is 0766,
|
# Mode of the limesurey runtime directory. Default is 0766,
|
||||||
|
@ -62,9 +69,10 @@
|
||||||
#
|
#
|
||||||
class limesurvey (
|
class limesurvey (
|
||||||
|
|
||||||
String $install_path,
|
String $archive_path,
|
||||||
|
String $dir_name,
|
||||||
String $download_url,
|
String $download_url,
|
||||||
String $version,
|
String $extract_path,
|
||||||
String $runtime_dir_mode,
|
String $runtime_dir_mode,
|
||||||
String $www_group,
|
String $www_group,
|
||||||
String $www_user,
|
String $www_user,
|
||||||
|
@ -87,6 +95,7 @@ class limesurvey (
|
||||||
String $webserver_class = 'limesurvey::webserver',
|
String $webserver_class = 'limesurvey::webserver',
|
||||||
String $php_class = 'limesurvey::php',
|
String $php_class = 'limesurvey::php',
|
||||||
|
|
||||||
|
String $install_path = "${extract_path}${dir_name}",
|
||||||
String $vhost_docroot = $install_path,
|
String $vhost_docroot = $install_path,
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "martialblog-limesurvey",
|
"name": "martialblog-limesurvey",
|
||||||
"version": "0.1.3",
|
"version": "0.1.1",
|
||||||
"author": "martialblog",
|
"author": "martialblog",
|
||||||
"summary": "Installation and Configuration of Limesurvey",
|
"summary": "Installation and Configuration of Limesurvey",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
"issues_url": "https://github.com/martialblog/puppet-limesurvey/issues",
|
"issues_url": "https://github.com/martialblog/puppet-limesurvey/issues",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{"name":"puppetlabs-stdlib","version_requirement":">= 1.0.0"},
|
{"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-concat","version_requirement":">= 2.2.0"},
|
||||||
{"name":"puppetlabs-apache","version_requirement":">= 1.10.0"},
|
{"name":"puppetlabs-apache","version_requirement":">= 1.10.0"},
|
||||||
{"name":"puppetlabs-mysql","version_requirement":">= 3.8.0"}
|
{"name":"puppetlabs-mysql","version_requirement":">= 3.8.0"}
|
||||||
|
|
Loading…
Reference in New Issue