Fix LimeSurvey tarball URL
They keep changing it... also streamlined tar extraction and folder creation
This commit is contained in:
parent
3454de6d47
commit
71fd2c5ef3
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
limesurvey::dbhost: 'localhost'
|
limesurvey::dbhost: 'localhost'
|
||||||
limesurvey::download_url: 'https://github.com/LimeSurvey/LimeSurvey/archive/'
|
limesurvey::download_url: 'https://github.com/LimeSurvey/LimeSurvey/archive/'
|
||||||
limesurvey::version: '2.51.4_160908'
|
limesurvey::version: '2.57.0+161202'
|
||||||
limesurvey::install_path: '/opt/limesurvey'
|
limesurvey::install_path: '/opt/limesurvey'
|
||||||
limesurvey::manage_database: true
|
limesurvey::manage_database: true
|
||||||
limesurvey::manage_webserver: true
|
limesurvey::manage_webserver: true
|
||||||
|
|
|
@ -52,29 +52,20 @@ class limesurvey::extract (
|
||||||
path => '/bin:/usr/bin',
|
path => '/bin:/usr/bin',
|
||||||
cwd => '/tmp',
|
cwd => '/tmp',
|
||||||
creates => "${install_path}/tmp/runtime",
|
creates => "${install_path}/tmp/runtime",
|
||||||
command => "bash -c 'cd /tmp; tar zxf /tmp/${version}.tar.gz'",
|
command => "bash -c 'cd /tmp; tar zxf /tmp/${version}.tar.gz -C ${install_path} --strip-components=1'",
|
||||||
require => Exec['limesurvey-download'],
|
require => Exec['limesurvey-download'],
|
||||||
user => $www_user,
|
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":
|
file { "/tmp/${version}.tar.gz":
|
||||||
ensure => absent,
|
ensure => absent,
|
||||||
require => Exec['limesurvey-copy'],
|
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-copy'],
|
require => Exec['limesurvey-unzip'],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue