-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathconfig.pp
More file actions
93 lines (83 loc) · 2.5 KB
/
Copy pathconfig.pp
File metadata and controls
93 lines (83 loc) · 2.5 KB
1
2
3
4
5
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
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
# Class: supervisord::config
#
# Configuration class for supervisor init and conf directories
#
class supervisord::config inherits supervisord {
if ($supervisord::manage_config) {
file { $supervisord::config_include:
ensure => directory,
owner => $supervisord::user,
group => $supervisord::group,
mode => '0755',
recurse => $supervisord::config_include_purge,
purge => $supervisord::config_include_purge,
notify => Class['supervisord::service'],
}
}
file { $supervisord::log_path:
ensure => directory,
owner => $supervisord::user,
group => $supervisord::group,
mode => '0644'
}
if $supervisord::run_path != '/var/run' {
file { $supervisord::run_path:
ensure => directory,
owner => $supervisord::user,
group => $supervisord::group,
mode => '0644'
}
}
if $supervisord::install_init {
file { $supervisord::init_script:
ensure => present,
owner => 'root',
mode => $supervisord::init_mode,
content => template($supervisord::init_script_template),
notify => Class['supervisord::service'],
}
if $supervisord::init_defaults {
file { $supervisord::init_defaults:
ensure => present,
owner => 'root',
mode => '0755',
content => template($supervisord::init_defaults_template),
notify => Class['supervisord::service'],
}
}
}
if ($supervisord::manage_config) {
concat { $supervisord::config_file:
owner => 'root',
group => '0',
mode => $supervisord::config_file_mode,
notify => Class['supervisord::service']
}
if $supervisord::unix_socket {
concat::fragment { 'supervisord_unix':
target => $supervisord::config_file,
content => template('supervisord/supervisord_unix.erb'),
order => '01'
}
}
if $supervisord::inet_server {
concat::fragment { 'supervisord_inet':
target => $supervisord::config_file,
content => template('supervisord/supervisord_inet.erb'),
order => '01'
}
}
if $supervisord::use_ctl_socket {
concat::fragment { 'supervisord_ctl':
target => $supervisord::config_file,
content => template('supervisord/supervisord_ctl.erb'),
order => '02'
}
}
concat::fragment { 'supervisord_main':
target => $supervisord::config_file,
content => template('supervisord/supervisord_main.erb'),
order => '03'
}
}
}