Commit 35123f3605220168c93e000dceb1b81befef466a

Authored by root ago
1 parent 967f809701
Exists in master

bug patch. add rpm for nginx

Showing 2 changed files with 55 additions and 22 deletions Side-by-side Diff

manifests/bmt-server.pp View file @ 35123f3
1   -node 'BMTPIKI-X-DB1' {
  1 +node 'localhost' {
2 2 include nginx
3   - include haproxy
4   - include php
5   -
6   - file { '/etc/nginx/nginx.conf':
7   - source => 'puppet:///modules/nginx/nginx.conf.webproxy.dev',
  3 +
  4 + file { ['/etc/nginx', '/etc/nginx/conf.d']:
  5 + ensure => directory,
8 6 }
9 7  
10   - file { '/etc/nginx/conf.d/http.conf':
11   - source => 'puppet:///modules/nginx/http.conf.webproxy.dev',
  8 + file { 'nginx.conf':
  9 + path => '/etc/nginx/nginx.conf',
  10 + ensure => present,
  11 + source => 'puppet:///modules/nginx/nginx.conf.webproxy.dev',
12 12 }
13 13  
14   - file { '/etc/nginx/fastcgi.conf':
  14 + file { 'fastcgi.conf':
  15 + path => '/etc/nginx/fastcgi.conf',
  16 + ensure => present,
15 17 source => 'puppet:///modules/nginx/fastcgi.conf.webproxy.dev',
16 18 }
17 19  
18   - file { '/etc/haproxy/haproxy.cfg':
19   - source => 'puppet:///modules/haproxy/haproxy.cfg.webproxy.dev',
  20 + file { 'httpd.conf':
  21 + path => '/etc/nginx/conf.d/http.conf',
  22 + ensure => present,
  23 + source => 'puppet:///modules/nginx/http.conf.webproxy.dev',
20 24 }
21   -
22   - file { '/etc/php-fpm.d/www.conf':
23   - source => 'puppet:///modules/php/www.conf.webserver.dev',
  25 +
  26 + include haproxy
  27 +
  28 + file { '/etc/haproxy':
  29 + ensure => directory,
24 30 }
25 31  
26   - file { '/etc/php.ini':
27   - source => 'puppet:///modules/php/php.ini.webserver.dev',
  32 + file { 'haproxy.cfg':
  33 + path => '/etc/haproxy/haproxy.cfg',
  34 + ensure => present,
  35 + source => 'puppet:///modules/haproxy/haproxy.cfg.webproxy.dev',
28 36 }
29 37  
30   - file { '/var/www':
31   - ensure => 'directory'
  38 + include php
  39 +
  40 + file { ['/etc/php-fpm.d']:
  41 + ensure => directory,
32 42 }
33 43  
34   - vcsrepo { '/var/www':
  44 + file { 'www.conf':
  45 + path => '/etc/php-fpm.d/www.conf',
35 46 ensure => present,
36   - provider => git,
37   - source => 'ssh://git@gitlab.pikicast.com:2222/Owen/pikicast-web-ci.git'
  47 + source => 'puppet:///modules/php/www.conf.webserver.dev',
38 48 }
  49 +
  50 + file { 'php.ini':
  51 + path => '/etc/php.ini',
  52 + ensure => present,
  53 + source => 'puppet:///modules/php/php.ini.webserver.dev',
  54 + }
  55 +
  56 + include puppetlabs-vcsrepo
39 57 }
modules/nginx/manifests/init.pp View file @ 35123f3
1 1 class nginx {
  2 + yumrepo { 'nginx-release':
  3 + baseurl => "http://nginx.org/packages/rhel/6/\$basearch/",
  4 + descr => 'nginx repo',
  5 + enabled => '1',
  6 + gpgcheck => '1',
  7 + priority => '1',
  8 + }
  9 +
  10 + file { '/etc/yum.repos.d/nginx-release.repo':
  11 + ensure => present,
  12 + require => Yumrepo['nginx-release'],
  13 + }
  14 +
2 15 package { 'nginx':
3 16 ensure => installed,
  17 + require => File['/etc/yum.repos.d/nginx-release.repo'],
4 18 }
5 19  
6 20 service { 'nginx':