|
32 | 32 | # ['puppetdb_startup_timeout'] - The timeout for puppetdb
|
33 | 33 | # ['dns_alt_names'] - Comma separated list of alternative DNS names
|
34 | 34 | # ['digest_algorithm'] - The algorithm to use for file digests.
|
35 |
| -# ['webserver'] - no webserver if undef, otherwise httpd |
| 35 | +# ['webserver'] - install 'nginx' (with unicorn) or 'httpd' (with passanger) |
36 | 36 | #
|
37 | 37 | # Requires:
|
38 | 38 | #
|
|
84 | 84 | $puppetdb_strict_validation = $::puppet::params::puppetdb_strict_validation,
|
85 | 85 | $dns_alt_names = ['puppet'],
|
86 | 86 | $digest_algorithm = $::puppet::params::digest_algorithm,
|
87 |
| - $webserver = undef, |
| 87 | + $webserver = 'httpd', |
88 | 88 | ) inherits puppet::params {
|
89 | 89 |
|
90 | 90 | anchor { 'puppet::master::begin': }
|
|
120 | 120 | ensure => $version,
|
121 | 121 | }
|
122 | 122 | }
|
123 |
| - if $webserver != undef { |
124 |
| - Anchor['puppet::master::begin'] -> |
| 123 | + case $webserver { |
| 124 | + httpd: { |
| 125 | + Anchor['puppet::master::begin'] -> |
125 | 126 | class {'puppet::passenger':
|
126 | 127 | puppet_passenger_port => $puppet_passenger_port,
|
127 | 128 | puppet_docroot => $puppet_docroot,
|
|
132 | 133 | conf_dir => $::puppet::params::confdir,
|
133 | 134 | dns_alt_names => join($dns_alt_names,','),
|
134 | 135 | } ->
|
135 |
| - Anchor['puppet::master::end'] |
| 136 | + Anchor['puppet::master::end'] |
| 137 | + } |
| 138 | + nginx: { |
| 139 | + Anchor['puppet::master::begin'] -> |
| 140 | + class {'puppet::unicorn':} |
136 | 141 | }
|
137 | 142 | service { $puppet_master_service:
|
138 | 143 | ensure => stopped,
|
|
147 | 152 | require => File[$::puppet::params::confdir],
|
148 | 153 | owner => $::puppet::params::puppet_user,
|
149 | 154 | group => $::puppet::params::puppet_group,
|
150 |
| - } |
151 |
| - if $webserver != undef { |
152 |
| - file { $::puppet::params::puppet_conf: |
153 |
| - notify => Service['httpd'], |
154 |
| - } |
| 155 | + notify => Service[$webserver], |
155 | 156 | }
|
156 | 157 | }
|
157 | 158 | else {
|
|
0 commit comments