OLD | NEW |
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 => File['/etc/init.d/spawn-fcgi'], | 16 require => [ |
| 17 File['/etc/init.d/spawn-fcgi'], |
| 18 File['/etc/systemd/system/spawn-fcgi.service'], |
| 19 ], |
17 } | 20 } |
18 | 21 |
19 file { '/etc/init.d/spawn-fcgi': | 22 file { '/etc/init.d/spawn-fcgi': |
20 ensure => present, | 23 ensure => present, |
21 owner => root, | 24 owner => root, |
22 group => root, | 25 group => root, |
23 mode => '0755', | 26 mode => '0755', |
24 content => template('spawn_fcgi/init-spawn-fcgi.erb'), | 27 content => template('spawn_fcgi/init-spawn-fcgi.erb'), |
25 require => Package['spawn-fcgi'], | 28 require => Package['spawn-fcgi'], |
26 } | 29 } |
27 | 30 |
| 31 file { [ |
| 32 '/etc/systemd', |
| 33 '/etc/systemd/system', |
| 34 ]: |
| 35 ensure => 'directory', |
| 36 } |
| 37 |
| 38 file { '/etc/systemd/system/spawn-fcgi.service': |
| 39 ensure => present, |
| 40 owner => root, |
| 41 group => root, |
| 42 mode => '0755', |
| 43 source => 'puppet:///modules/spawn_fcgi/spawn-fcgi.service', |
| 44 require => [ |
| 45 File['/etc/systemd/system'], |
| 46 Package['spawn-fcgi'], |
| 47 ] |
| 48 } |
| 49 |
28 file { '/etc/spawn-fcgi': | 50 file { '/etc/spawn-fcgi': |
29 ensure => directory, | 51 ensure => directory, |
30 require => Package['spawn-fcgi'], | 52 require => Package['spawn-fcgi'], |
31 } | 53 } |
32 } | 54 } |
OLD | NEW |