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

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

Issue 5731052198821888: #1203 - Establish nginx::hostconfig-fragment() directive (Closed)
Left Patch Set: Created Aug. 13, 2014, 9:07 a.m.
Right Patch Set: #1203 - Establish nginx::hostconfig-fragment() directive Created Aug. 18, 2014, 10:01 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 | « no previous file | modules/nginx/templates/site.erb » ('j') | 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 nginx ( 1 class nginx (
2 $worker_processes = $nginx::params::worker_processes, 2 $worker_processes = $nginx::params::worker_processes,
3 $worker_connections = $nginx::params::worker_connections, 3 $worker_connections = $nginx::params::worker_connections,
4 $ssl_session_cache = $nginx::params::ssl_session_cache, 4 $ssl_session_cache = $nginx::params::ssl_session_cache,
5 $fragment_directory = "/etc/nginx/fragments", 5 $fragment_directory = "/etc/nginx/fragments",
6 ) inherits nginx::params { 6 ) inherits nginx::params {
7 7
8 apt::source {'nginx': 8 apt::source {'nginx':
9 location => "http://nginx.org/packages/ubuntu", 9 location => "http://nginx.org/packages/ubuntu",
10 repos => "nginx", 10 repos => "nginx",
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 define hostconfig-fragment ( 53 define hostconfig-fragment (
54 $domain, 54 $domain,
55 $content = undef, 55 $content = undef,
56 $ensure = 'present') { 56 $ensure = 'present') {
57 57
58 file {"${$nginx::fragment_directory}/${domain}/${name}.conf": 58 file {"${$nginx::fragment_directory}/${domain}/${name}.conf":
59 content => $content, 59 content => $content,
60 ensure => $ensure, 60 ensure => $ensure,
61 require => File["${nginx::fragment_directory}/${domain}"], 61 require => File["${nginx::fragment_directory}/${domain}"],
62 notify => Service['nginx'],
62 } 63 }
63 } 64 }
64 65
65 define hostconfig ( 66 define hostconfig (
66 $domain = $title, 67 $domain = $title,
67 $alt_names = [], 68 $alt_names = [],
68 $log, 69 $log,
69 $is_default = false, 70 $is_default = false,
70 $source = undef, 71 $source = undef,
71 $content = undef, 72 $content = undef,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 145 }
145 146
146 service {'nginx': 147 service {'nginx':
147 ensure => running, 148 ensure => running,
148 enable => true, 149 enable => true,
149 restart => '/etc/init.d/nginx reload', 150 restart => '/etc/init.d/nginx reload',
150 hasstatus => true, 151 hasstatus => true,
151 require => File['/etc/nginx/nginx.conf'] 152 require => File['/etc/nginx/nginx.conf']
152 } 153 }
153 } 154 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld