Commit 8da41999 by source_reader

added directories to pi install

parent fa6fe91b
Showing with 26 additions and 3 deletions
class nginx::pi{
notice("including pi nginx")
$dirs = ['/usr/lib/nginx','/usr/lib/nginx/modules',
'/usr/share/nginx', '/usr/share/nginx/html']
file {$dirs:,
owner => root,
group => root,
ensure => directory
}
file {'/etc/nginx/nginx.conf':
source => 'puppet:///modules/nginx/nginx.conf',
owner => root,
group => root,
mode => '0644',
require => File['/etc/nginx']
}
file {'/etc/nginx/site.conf':
source => 'puppet:///modules/nginx/site.conf',
owner => root,
group => root,
mode => '0644',
require => File['/etc/nginx']
}
file {'/etc/nginx':
ensure => directory,
......@@ -21,11 +29,18 @@ class nginx::pi{
recurse => true,
source => 'puppet:///modules/nginx/pi/conf'
}
file{'/etc/nginx/conf.d':
ensure => directory,
owner => root,
group => root,
require => File['/etc/nginx']
}
file {'/etc/nginx/conf.d/passenger.conf':
ensure => directory,
owner => root,
group => root,
source => 'puppet:///modules/nginx/pi/passenger.conf'
require => File['/etc/nginx/conf.d']
}
file {'/usr/lib/nginx/modules':
......@@ -33,7 +48,8 @@ class nginx::pi{
owner => root,
group => root,
recurse => true,
source => 'puppet:///modules/nginx/pi/objs'
source => 'puppet:///modules/nginx/pi/objs',
require => File['/usr/lib/nginx']
}
file{'/usr/share/nginx/html':
owner => root,
......@@ -41,6 +57,7 @@ class nginx::pi{
ensure => directory,
recurse => true,
source => 'puppet:///modules/nginx/pi/html',
require => File['/usr/share/nginx']
}
file{'/usr/sbin/nginx':
owner => root,
......@@ -53,9 +70,15 @@ class nginx::pi{
group => root,
source => 'puppet:///modules/nginx/pi/nginx.service'
}
package {'passenger':
ensure => "6.0.4",
provider => gem,
}
service {'nginx':
ensure => running,
require => [File['/etc/systemd/system/nginx.conf']]
require => [File['/etc/systemd/system/nginx.service'],
Package['passenger']]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment