Puppet Class: phabricator::phd

Defined in:
modules/phabricator/manifests/phd.pp

Overview

Parameters:

  • settings (Hash) (defaults to: {})
  • basedir (Stdlib::Unixpath) (defaults to: '/')


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'modules/phabricator/manifests/phd.pp', line 6

class phabricator::phd (
    Hash $settings            = {},
    Stdlib::Unixpath $basedir = '/',
) {
    group { 'phd':
        ensure => present,
        system => true,
    }

    # PHD user needs perms to drop root perms on start
    file { "${basedir}/phabricator/scripts/daemon/":
        owner   => $settings['phd.user'],
        recurse => true,
    }

    # Managing repo's as the PHD user
    file { "${basedir}/phabricator/scripts/repository/":
        owner   => $settings['phd.user'],
        recurse => true,
    }

    file { '/var/run/phd':
        ensure => directory,
        owner  => 'phd',
        group  => 'phd',
    }

    file { $settings['phd.log-directory']:
        ensure => 'directory',
        owner  => 'phd',
        group  => 'phd',
    }

    user { $settings['phd.user']:
        gid    => 'phd',
        shell  => '/bin/false',
        home   => '/var/run/phd',
        system => true,
    }

    logrotate::conf { 'phd':
        ensure => present,
        source => 'puppet:///modules/phabricator/logrotate_phd',
    }
}