LEFT | RIGHT |
1 # Define : spawn_fcgi::pool | 1 # Define : spawn_fcgi::pool |
2 # | 2 # |
3 # Define a spawn_fcgi pool snippet. Places all pool snippets into | 3 # Define a spawn-fcgi pool snippet. Places all pool snippets into |
4 # /etc/spawn-fcgi, where they will be automatically loaded | 4 # /etc/spawn-fcgi, where they will be automatically loaded |
5 # | 5 # |
6 # Parameters : | 6 # Parameters : |
7 # * ensure: typically set to "present" or "absent". | 7 # * ensure: typically set to "present" or "absent". |
8 # Defaults to "present" | 8 # Defaults to "present" |
9 # * pool_name: set name of pool, which is used to identify config template | 9 # * pool_name: set name of pool, which is used to identify config template |
10 # Defaults to 'pool' | 10 # Defaults to 'pool' |
11 # * content: set the content of the pool snippet. | 11 # * content: set the content of the pool snippet. |
12 # Defaults to 'template("spawn-fcgi/pool.d/$pool_name.conf.erb")', | 12 # Defaults to 'template("spawn_fcgi/pool.d/$pool_name.conf.erb")', |
13 # Undefined loads generic 'template("spawn-fcgi/pool.d/pool.conf.erb")' | 13 # Undefined loads generic 'template("spawn_fcgi/pool.d/pool.conf.erb")' |
14 # * order: specifies the load order for this pool snippet. | 14 # * order: specifies the load order for this pool snippet. |
15 # Defaults to "500" | 15 # Defaults to "500" |
16 # * fcgi_app: set binary to load fcgi-procs from | 16 # * fcgi_app: set binary to load fcgi-procs from |
17 # Defaults to '/bin/false' | 17 # Defaults to '/bin/false' |
18 # * fcgi_app_args: set the arguments to load binary with | 18 # * fcgi_app_args: set the arguments to load binary with |
19 # * ip: set the ip the fcgi pool should listen on | 19 # * ip: set the ip the fcgi pool should listen on |
20 # Defaults to '127.0.0.1' | 20 # Defaults to '127.0.0.1' |
21 # * port: set the port fcgi pool should listen on | 21 # * port: set the port fcgi pool should listen on |
22 # Defaults to '9000' | 22 # Defaults to '9000' |
23 # * socket: set path where to spawn unix-socket | 23 # * socket: set path where to spawn unix-socket |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 }, | 65 }, |
66 default => $temp_ip | 66 default => $temp_ip |
67 } | 67 } |
68 | 68 |
69 $real_pool_name = $pool_name ? { | 69 $real_pool_name = $pool_name ? { |
70 default => $pool_name, | 70 default => $pool_name, |
71 undef => 'pool' | 71 undef => 'pool' |
72 } | 72 } |
73 | 73 |
74 $real_content = $content ? { | 74 $real_content = $content ? { |
75 '' => template("spawn-fcgi/${real_pool_name}.erb"), | 75 '' => template("spawn_fcgi/${real_pool_name}.erb"), |
76 default => $content, | 76 default => $content, |
77 } | 77 } |
78 | 78 |
79 file { "/etc/spawn-fcgi/${order}-${name}": | 79 file { "/etc/spawn-fcgi/${order}-${name}": |
80 ensure => $ensure, | 80 ensure => $ensure, |
81 content => $real_content, | 81 content => $real_content, |
82 mode => '0644', | 82 mode => '0644', |
83 owner => root, | 83 owner => root, |
84 group => root, | 84 group => root, |
85 notify => Service['spawn-fcgi'], | 85 notify => Service['spawn-fcgi'], |
86 require => Package['spawn-fcgi'] | 86 require => Package['spawn-fcgi'] |
87 } | 87 } |
88 | 88 |
89 } | 89 } |
LEFT | RIGHT |