Make the linter happy and do other changes that allow the manifest
to run all the way through.
This commit is contained in:
parent
4816c135c7
commit
caf5edb376
|
@ -0,0 +1,8 @@
|
||||||
|
require 'rubygems'
|
||||||
|
require 'puppetlabs_spec_helper/rake_tasks'
|
||||||
|
require 'puppet-lint/tasks/puppet-lint'
|
||||||
|
PuppetLint.configuration.fail_on_warnings = true
|
||||||
|
PuppetLint.configuration.send('disable_80chars')
|
||||||
|
PuppetLint.configuration.send('disable_autoloader_layout')
|
||||||
|
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
|
||||||
|
PuppetLint.configuration.send('disable_class_parameter_defaults')
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
class phabricator (
|
class phabricator (
|
||||||
$vhost_name = $::fqdn,
|
$vhost_name = $::fqdn,
|
||||||
$phab_dir = "/phabricator",
|
$phab_dir = '/phabricator',
|
||||||
$instance = 'dev',
|
$instance = 'dev',
|
||||||
$mysql_host = 'localhost',
|
$mysql_host = 'localhost',
|
||||||
$mysql_port = 3306,
|
$mysql_port = 3306,
|
||||||
|
@ -17,17 +17,17 @@ class phabricator (
|
||||||
$ssl_chain_file_contents = '' # If left empty puppet will not create file.
|
$ssl_chain_file_contents = '' # If left empty puppet will not create file.
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$instances_dir = "${phab_dir}/instances",
|
$instances_dir = "${phab_dir}/instances"
|
||||||
$instance_dir = "${instances_dir}/${instance}"",
|
$instance_dir = "${instances_dir}/${instance}"
|
||||||
|
|
||||||
$packages = [
|
$packages = [
|
||||||
"php5",
|
'php5',
|
||||||
"php5-mysql",
|
'php5-mysql',
|
||||||
"php5-gd",
|
'php5-gd',
|
||||||
"php5-dev",
|
'php5-dev',
|
||||||
"php5-curl",
|
'php5-curl',
|
||||||
"php-apc",
|
'php-apc',
|
||||||
"php5-cli"
|
'php5-cli'
|
||||||
]
|
]
|
||||||
package { $packages:
|
package { $packages:
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
|
@ -82,8 +82,7 @@ class phabricator (
|
||||||
vcsrepo { "${instance_dir}/phabricator":
|
vcsrepo { "${instance_dir}/phabricator":
|
||||||
ensure => latest,
|
ensure => latest,
|
||||||
provider => git,
|
provider => git,
|
||||||
revision => $commit,
|
source => 'https://github.com/phacility/phabricator.git',
|
||||||
source => "https://github.com/phacility/phabricator.git",
|
|
||||||
require => [
|
require => [
|
||||||
File[$instance_dir],
|
File[$instance_dir],
|
||||||
Package['git'],
|
Package['git'],
|
||||||
|
@ -93,8 +92,7 @@ class phabricator (
|
||||||
vcsrepo { "${instance_dir}/arcanist":
|
vcsrepo { "${instance_dir}/arcanist":
|
||||||
ensure => latest,
|
ensure => latest,
|
||||||
provider => git,
|
provider => git,
|
||||||
revision => $commit,
|
source => 'https://github.com/phacility/arcanist.git',
|
||||||
source => "https://github.com/phacility/arcanist.git",
|
|
||||||
require => [
|
require => [
|
||||||
File[$instance_dir],
|
File[$instance_dir],
|
||||||
Package['git'],
|
Package['git'],
|
||||||
|
@ -104,38 +102,37 @@ class phabricator (
|
||||||
vcsrepo { "${instance_dir}/libphutil":
|
vcsrepo { "${instance_dir}/libphutil":
|
||||||
ensure => latest,
|
ensure => latest,
|
||||||
provider => git,
|
provider => git,
|
||||||
revision => $commit,
|
source => 'https://github.com/phacility/libphutil.git',
|
||||||
source => "https://github.com/phacility/libphutil.git",
|
|
||||||
require => [
|
require => [
|
||||||
File[$instance_dir],
|
File[$instance_dir],
|
||||||
Package['git'],
|
Package['git'],
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "initial.db":
|
file { 'initial.db':
|
||||||
path => "${phab_dir}/initial.db",
|
|
||||||
source => "puppet:///modules/phabricator/initial.db",
|
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
path => "${phab_dir}/initial.db",
|
||||||
|
source => 'puppet:///modules/phabricator/initial.db',
|
||||||
}
|
}
|
||||||
|
|
||||||
file {'local.json':
|
file {'local.json':
|
||||||
path => "${instance_dir}/phabricator/conf/local/local.json",
|
|
||||||
content => template("phabricator/local.json.erb"),
|
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
path => "${instance_dir}/phabricator/conf/local/local.json",
|
||||||
|
content => template('phabricator/local.json.erb'),
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "load-initial-db":
|
exec { 'load-initial-db':
|
||||||
command => "mysql < ${phab_dir}/initial.db && ${instance_dir}/phabricator/bin/storage upgrade --force",
|
command => "mysql < ${phab_dir}/initial.db && ${instance_dir}/phabricator/bin/storage upgrade --force",
|
||||||
unless => "${instance_dir}/phabricator/bin/storage status",
|
unless => "${instance_dir}/phabricator/bin/storage status",
|
||||||
subscribe => File["initial.db"],
|
subscribe => File['initial.db'],
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
require => [
|
require => [
|
||||||
Vcsrepo["$instance_dir/phabricator"],
|
Vcsrepo["${instance_dir}/phabricator"],
|
||||||
File["initial.db"],
|
File['initial.db'],
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "update-database":
|
exec { 'update-database':
|
||||||
command => "${instance_dir}/phabricator/bin/storage upgrade --force",
|
command => "${instance_dir}/phabricator/bin/storage upgrade --force",
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
subscribe => Vcsrepo["${instance_dir}/phabricator"],
|
subscribe => Vcsrepo["${instance_dir}/phabricator"],
|
||||||
|
@ -151,7 +148,7 @@ class phabricator (
|
||||||
port => 443,
|
port => 443,
|
||||||
docroot => "${instance_dir}/phabricator/webroot",
|
docroot => "${instance_dir}/phabricator/webroot",
|
||||||
priority => '50',
|
priority => '50',
|
||||||
template => "phabricator/vhost.erb",
|
template => 'phabricator/vhost.erb',
|
||||||
ssl => true,
|
ssl => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue