More puppet-lint formatting fixes
Yet another bunch of puppet-lint fixes. Change-Id: I9574cf1c5e35620b12e4d5e2bd6b2eb4d320c935 Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com> Reviewed-on: https://review.openstack.org/13988 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
e67f7ef122
commit
13773cd105
@ -1,64 +1,76 @@
|
|||||||
class etherpad_lite::mysql(
|
class etherpad_lite::mysql(
|
||||||
|
$database_password,
|
||||||
$dbType = 'mysql',
|
$dbType = 'mysql',
|
||||||
$database_user = 'eplite',
|
$database_user = 'eplite',
|
||||||
$database_name = 'etherpad-lite',
|
$database_name = 'etherpad-lite'
|
||||||
$database_password
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include etherpad_lite
|
include etherpad_lite
|
||||||
|
|
||||||
package { 'mysql-server':
|
package { 'mysql-server':
|
||||||
ensure => present
|
ensure => present,
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'mysql-client':
|
package { 'mysql-client':
|
||||||
ensure => present
|
ensure => present,
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "mysql":
|
service { 'mysql':
|
||||||
enable => true,
|
|
||||||
ensure => running,
|
ensure => running,
|
||||||
|
enable => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
require => [Package['mysql-server'],
|
require => [
|
||||||
Package['mysql-client']]
|
Package['mysql-server'],
|
||||||
|
Package['mysql-client']
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "${etherpad_lite::base_install_dir}/etherpad-lite/create_database.sh":
|
file { "${etherpad_lite::base_install_dir}/etherpad-lite/create_database.sh":
|
||||||
ensure => 'present',
|
ensure => present,
|
||||||
content => template('etherpad_lite/create_database.sh.erb'),
|
content => template('etherpad_lite/create_database.sh.erb'),
|
||||||
replace => true,
|
|
||||||
owner => $etherpad_lite::ep_user,
|
|
||||||
group => $etherpad_lite::ep_user,
|
group => $etherpad_lite::ep_user,
|
||||||
mode => 0755,
|
mode => '0755',
|
||||||
|
owner => $etherpad_lite::ep_user,
|
||||||
|
replace => true,
|
||||||
require => Class['etherpad_lite']
|
require => Class['etherpad_lite']
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "${etherpad_lite::base_install_dir}/etherpad-lite/create_user.sh":
|
file { "${etherpad_lite::base_install_dir}/etherpad-lite/create_user.sh":
|
||||||
ensure => 'present',
|
ensure => present,
|
||||||
content => template('etherpad_lite/create_user.sh.erb'),
|
content => template('etherpad_lite/create_user.sh.erb'),
|
||||||
replace => true,
|
|
||||||
owner => $etherpad_lite::ep_user,
|
|
||||||
group => $etherpad_lite::ep_user,
|
group => $etherpad_lite::ep_user,
|
||||||
mode => 0755,
|
mode => '0755',
|
||||||
|
owner => $etherpad_lite::ep_user,
|
||||||
|
replace => true,
|
||||||
require => Class['etherpad_lite']
|
require => Class['etherpad_lite']
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "create-etherpad-lite-db":
|
exec { 'create-etherpad-lite-db':
|
||||||
unless => "mysql --defaults-file=/etc/mysql/debian.cnf ${database_name}",
|
unless => "mysql --defaults-file=/etc/mysql/debian.cnf ${database_name}",
|
||||||
path => ['/bin', '/usr/bin'],
|
path => [
|
||||||
|
'/bin', '/usr/bin'
|
||||||
|
],
|
||||||
command => "${etherpad_lite::base_install_dir}/etherpad-lite/create_database.sh",
|
command => "${etherpad_lite::base_install_dir}/etherpad-lite/create_database.sh",
|
||||||
require => [Service['mysql'],
|
require => [
|
||||||
|
Service['mysql'],
|
||||||
File["${etherpad_lite::base_install_dir}/etherpad-lite/settings.json"],
|
File["${etherpad_lite::base_install_dir}/etherpad-lite/settings.json"],
|
||||||
File["${etherpad_lite::base_install_dir}/etherpad-lite/create_database.sh"]]
|
File["${etherpad_lite::base_install_dir}/etherpad-lite/create_database.sh"]
|
||||||
} ->
|
],
|
||||||
|
before => Exec['grant-etherpad-lite-db'],
|
||||||
|
}
|
||||||
|
|
||||||
exec { "grant-etherpad-lite-db":
|
exec { 'grant-etherpad-lite-db':
|
||||||
unless => "mysql -u${database_user} -p${database_password} ${database_name}",
|
unless => "mysql -u${database_user} -p${database_password} ${database_name}",
|
||||||
path => ['/bin', '/usr/bin'],
|
path => [
|
||||||
|
'/bin',
|
||||||
|
'/usr/bin'
|
||||||
|
],
|
||||||
command => "${etherpad_lite::base_install_dir}/etherpad-lite/create_user.sh",
|
command => "${etherpad_lite::base_install_dir}/etherpad-lite/create_user.sh",
|
||||||
require => [Service['mysql'],
|
require => [
|
||||||
|
Service['mysql'],
|
||||||
File["${etherpad_lite::base_install_dir}/etherpad-lite/settings.json"],
|
File["${etherpad_lite::base_install_dir}/etherpad-lite/settings.json"],
|
||||||
File["${etherpad_lite::base_install_dir}/etherpad-lite/create_user.sh"]]
|
File["${etherpad_lite::base_install_dir}/etherpad-lite/create_user.sh"]
|
||||||
|
],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
class planet {
|
class planet {
|
||||||
|
|
||||||
package { 'planet-venus':
|
package { 'planet-venus':
|
||||||
ensure => present
|
ensure => present,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/srv/planet':
|
file { '/srv/planet':
|
||||||
ensure => directory
|
ensure => directory,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/var/lib/planet':
|
file { '/var/lib/planet':
|
||||||
ensure => directory
|
ensure => directory,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/var/log/planet':
|
file { '/var/log/planet':
|
||||||
ensure => directory
|
ensure => directory,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||||
|
@ -1,26 +1,29 @@
|
|||||||
define planet::site($git_url, $vhost_name="planet.${name}.org") {
|
define planet::site(
|
||||||
|
$git_url,
|
||||||
|
$vhost_name = "planet.${name}.org"
|
||||||
|
) {
|
||||||
include apache
|
include apache
|
||||||
include remove_nginx
|
include remove_nginx
|
||||||
|
|
||||||
apache::vhost { $vhost_name:
|
apache::vhost { $vhost_name:
|
||||||
|
docroot => "/srv/planet/${name}",
|
||||||
port => 80,
|
port => 80,
|
||||||
priority => '50',
|
priority => '50',
|
||||||
docroot => "/srv/planet/${name}",
|
require => File['/srv/planet'],
|
||||||
require => File["/srv/planet"],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vcsrepo { "/var/lib/planet/${name}":
|
vcsrepo { "/var/lib/planet/${name}":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
provider => git,
|
provider => git,
|
||||||
source => $git_url,
|
|
||||||
require => File['/var/lib/planet'],
|
require => File['/var/lib/planet'],
|
||||||
|
source => $git_url,
|
||||||
}
|
}
|
||||||
|
|
||||||
cron { "update_planet_${name}":
|
cron { "update_planet_${name}":
|
||||||
user => root,
|
command => "date >> /var/log/planet/${name}.log && cd /var/lib/planet/${name} && git pull -q --ff-only && planet /var/lib/planet/${name}/planet.ini >> /var/log/planet/${name}.log 2>&1",
|
||||||
minute => "*/5",
|
minute => '*/5',
|
||||||
command => "date >> /var/log/planet/${name}.log && cd /var/lib/planet/${name} && git pull -q --ff-only && planet /var/lib/planet/${name}/planet.ini >> /var/log/planet/${name}.log 2>&1"
|
user => 'root',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
class subversion {
|
class subversion {
|
||||||
package { ["subversion"]:
|
package { 'subversion':
|
||||||
ensure => latest;
|
ensure => latest,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||||
|
Loading…
Reference in New Issue
Block a user