Puppet Class: phabricator
- Defined in:
- manifests/init.pp
Summary
This class configures and installs Phabricator.Overview
Class for installing Phabricator.
TODO: Remove the default values after we drop support for Puppet 4.7.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'manifests/init.pp', line 47
class phabricator(
Phabricator::Revision $arcanist_revision = 'stable',
Phabricator::Revision $libphutil_revision = 'stable',
Phabricator::Revision $phabricator_revision = 'stable',
Hash[String, Data] $config_hash = {},
Boolean $install_fonts = false,
Boolean $manage_diffusion = false,
Boolean $storage_upgrade = false,
Optional[String] $storage_upgrade_user = undef,
Optional[String] $storage_upgrade_password = undef,
String $daemon_user = 'phd',
String $group = 'phabricator',
Stdlib::Unixpath $install_dir = '/usr/local/src',
Stdlib::Unixpath $logs_dir = '/var/log/phabricator',
Stdlib::Unixpath $pid_dir = '/run/phabricator',
Stdlib::Unixpath $repo_dir = '/var/repo',
String $vcs_user = 'diffusion',
) {
if $storage_upgrade {
assert_type(String, $storage_upgrade_user)
assert_type(String, $storage_upgrade_password)
}
$config = merge(
$config_hash,
{
'diffusion.ssh-user' => $vcs_user,
'environment.append-paths' => ['/usr/lib/git-core'],
'log.access.path' => "${logs_dir}/access.log",
'log.ssh.path' => "${logs_dir}/ssh.log",
'phd.log-directory' => $logs_dir,
'phd.pid-directory' => $pid_dir,
'phd.user' => $daemon_user,
'repository.default-local-path' => $repo_dir,
}
)
# TODO: It's not currently possible to test for warnings with `rspec-puppet`.
# See https://github.com/rodjek/rspec-puppet/issues/108.
if $facts['phpversion'] != undef and versioncmp($facts['phpversion'], '7.0.0') >= 0 and versioncmp($facts['phpversion'], '7.1.0') < 0 {
warning('Phabricator does not support PHP 7.1. See https://secure.phabricator.com/T12101.')
}
include phabricator::config
include phabricator::install
}
|