Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/spawn_fcgi/manifests/init.pp

Issue 29502643: #2498 - Provide systemd unit for spawn-fcgi (Closed) Base URL: https://hg1/infrastructure
Left Patch Set: Improve syntax and ensure parent dirs are present. Comment unit file Created Aug. 2, 2017, 10:34 a.m.
Right Patch Set: forgot to write file before commit. argh Created Aug. 8, 2017, 10:51 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « modules/spawn_fcgi/files/spawn-fcgi.service ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # Class: spawn_fcgi 1 # Class: spawn_fcgi
2 # 2 #
3 # This class manage spawn-fcgi installation and configuration. 3 # This class manage spawn-fcgi installation and configuration.
4 # 4 #
5 # Use spawn_fcgi::pool for configuring spawn-fcgi pools 5 # Use spawn_fcgi::pool for configuring spawn-fcgi pools
6 # Use spawn_fcgi::php-pool to configure a preconfigured php-pool 6 # Use spawn_fcgi::php-pool to configure a preconfigured php-pool
7 # 7 #
8 class spawn_fcgi { 8 class spawn_fcgi {
9 9
10 package { 'spawn-fcgi': ensure => installed } 10 package { 'spawn-fcgi': ensure => installed }
11 11
12 service { 'spawn-fcgi': 12 service { 'spawn-fcgi':
13 ensure => running, 13 ensure => running,
14 hasstatus => true, 14 hasstatus => true,
15 enable => true, 15 enable => true,
16 require => [ 16 require => [
17 File['/etc/init.d/spawn-fcgi'], 17 File['/etc/init.d/spawn-fcgi'],
18 File['/etc/systemd/system/spawn-fcgi.service'], 18 File['/etc/systemd/system/spawn-fcgi.service'],
19 ], 19 ],
20 } 20 }
21 21
22 file { '/etc/init.d/spawn-fcgi': 22 file { '/etc/init.d/spawn-fcgi':
23 ensure => present, 23 ensure => present,
24 owner => root, 24 owner => root,
25 group => root, 25 group => root,
26 mode => '0755', 26 mode => '0755',
27 content => template('spawn_fcgi/init-spawn-fcgi.erb'), 27 content => template('spawn_fcgi/init-spawn-fcgi.erb'),
28 require => Package['spawn-fcgi'], 28 require => Package['spawn-fcgi'],
29 } 29 }
30 30
31 file { [ 31 file { [
32 '/etc/systemd', 32 '/etc/systemd',
33 '/etc/systemd/system', 33 '/etc/systemd/system',
34 ]: 34 ]:
35 ensure => 'directory', 35 ensure => 'directory',
36 } 36 }
37 37
38 # #2498: As systemd is not reliably enabling legacy sysvinit scripts, we
39 # provide the # unit file (as generated by systemd when enabling the
40 # service manually). This workaround can be considered for removal with
41 # systemd 220, or when the package ships with its own systemd unit.
38 file { '/etc/systemd/system/spawn-fcgi.service': 42 file { '/etc/systemd/system/spawn-fcgi.service':
39 ensure => present, 43 ensure => present,
40 owner => root, 44 owner => root,
41 group => root, 45 group => root,
42 mode => '0755', 46 mode => '0755',
43 source => 'puppet:///modules/spawn_fcgi/spawn-fcgi.service', 47 source => 'puppet:///modules/spawn_fcgi/spawn-fcgi.service',
44 require => [ 48 require => [
45 File['/etc/systemd/system'], 49 File['/etc/systemd/system'],
46 Package['spawn-fcgi'], 50 Package['spawn-fcgi'],
47 ] 51 ]
48 } 52 }
49 53
50 file { '/etc/spawn-fcgi': 54 file { '/etc/spawn-fcgi':
51 ensure => directory, 55 ensure => directory,
52 require => Package['spawn-fcgi'], 56 require => Package['spawn-fcgi'],
53 } 57 }
54 } 58 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld