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
|
# File 'manifests/install.pp', line 1
class unicorn_systemd::install (
$ensure = present,
$user = 'nobody',
$group = undef,
$working_directory = undef,
$listen_streams = ['127.0.0.1:8080', '/var/run/unicorn.sock'],
$exec_start = undef,
$environment = {},
){
validate_string($user)
validate_string($group)
validate_absolute_path($working_directory)
if is_string($listen_streams) {
any2array($listen_streams)
} else {
validate_array($listen_streams)
}
validate_string($exec_start)
validate_hash($environment)
file {
'/etc/systemd/system/unicorn.socket':
ensure => $ensure,
content => template('unicorn_systemd/unicorn.socket.erb'),
owner => 'root',
group => 'root',
mode => '0644';
'/etc/systemd/system/unicorn@.service':
ensure => $ensure,
content => template('unicorn_systemd/unicorn@.service.erb'),
owner => 'root',
group => 'root',
mode => '0644';
}
}
|