Skip to content

Commit 3470c73

Browse files
author
Tim Meusel
committed
implement ip binding for nginx
1 parent e507d4d commit 3470c73

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

manifests/master.pp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
# ['puppetdb_startup_timeout'] - The timeout for puppetdb
3333
# ['dns_alt_names'] - Comma separated list of alternative DNS names
3434
# ['digest_algorithm'] - The algorithm to use for file digests.
35-
# ['webserver'] - install 'nginx' (with unicorn) or 'httpd' (with passenger)
35+
# ['webserver'] - install 'nginx' (with unicorn) or 'httpd' (with passenger) - httpd is default
36+
# ['listen_address'] - IP for binding the webserver, defaults to *
3637
#
3738
# Requires:
3839
#
@@ -84,7 +85,8 @@
8485
$puppetdb_strict_validation = $::puppet::params::puppetdb_strict_validation,
8586
$dns_alt_names = ['puppet'],
8687
$digest_algorithm = $::puppet::params::digest_algorithm,
87-
$webserver = 'httpd',
88+
$webserver = $::puppet::params::default_webserver,
89+
$listen_address = $::puppet::params::listen_address,
8890
) inherits puppet::params {
8991

9092
anchor { 'puppet::master::begin': }
@@ -123,7 +125,9 @@
123125
case $webserver {
124126
nginx: {
125127
Anchor['puppet::master::begin'] ->
126-
class {'puppet::unicorn':} ->
128+
class {'puppet::unicorn':
129+
listen_address => $listen_address,
130+
} ->
127131
Anchor['puppet::master::end']
128132
}
129133
default: {

manifests/params.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
$puppetdb_strict_validation = true
3232
$environments = 'config'
3333
$digest_algorithm = 'md5'
34+
$listen_address = '*'
35+
$default_webserver = 'httpd'
3436

3537
# Only used when environments == directory
3638
$environmentpath = '$confdir/environments'

0 commit comments

Comments
 (0)