Skip to content

Instantly share code, notes, and snippets.

@CodeDredd
Created March 20, 2015 18:33
Show Gist options
  • Save CodeDredd/848bd7f3386dcafe1158 to your computer and use it in GitHub Desktop.
Save CodeDredd/848bd7f3386dcafe1158 to your computer and use it in GitHub Desktop.
Smylink improvment & htaccess integration
class typo3 {
define load_typo3 {
vcsrepo { "${title}/typo3_${typo3_branch}":
ensure => latest,
revision => $typo3_branch,
provider => git,
source => "https://github.com/TYPO3/TYPO3.CMS.git",
depth => 1,
}
exec { 'typo3symlinks':
cwd => $title,
command => "/bin/ln -sf typo3_${typo3_branch} typo3_src && /bin/ln -sf typo3_src/index.php && /bin/ln -sf typo3_src/typo3",
require => Vcsrepo["${title}/typo3_${typo3_branch}"],
onlyif => ["/usr/bin/test ! -L ${title}/typo3_src","/usr/bin/test ! -L ${title}/index.php","/usr/bin/test ! -L ${title}/typo3"],
}
exec { 'htaccess':
cwd => $title,
command => "/bin/mv typo3_src/_.htaccess ./.htaccess",
require => Exec['typo3symlinks'],
onlyif => ["/usr/bin/test ! -e ${title}/typo3_src"],
}
file { [ "${title}/typo3conf", "${title}/typo3conf/ext" ]:
ensure => directory
}
file { "${title}/typo3conf/ENABLE_INSTALL_TOOL":
ensure => present,
content => '',
require => File["${title}/typo3conf"],
}
mysql::db { 'typo3':
user => 'typo3',
password => 'password',
host => 'localhost',
grant => ['all'],
charset => 'utf8',
require => File['/root/.my.cnf'],
}
exec { 'setupTYPO3':
command => "/vagrant/installTYPO3.sh ${document_root}",
require => [Mysql::Db['typo3']],
onlyif => "/usr/bin/test ! -e ${title}/typo3conf/PackageStates.php",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment