Skip to content

Commit e507d4d

Browse files
author
Tim Meusel
committed
add listen_address var for nginx vhost template
1 parent ae68d66 commit e507d4d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

manifests/unicorn.pp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Class: puppet::unicorn
22
#
33
# Parameters:
4-
# none
4+
# - listen_address - IP for binding the nginx
55
#
66
# Actions:
77
# - Configures nginx and unicorn for puppet master use. Tested only on CentOS 7
@@ -10,12 +10,16 @@
1010
# - nginx
1111
#
1212
# Sample Usage:
13-
# class {'puppet::unicorn':}
13+
# class {'puppet::unicorn':
14+
# listen_address => '10.250.250.1',
15+
# }
1416
#
1517
# written by Tim 'bastelfreak' Meusel
1618
# with big help from Rob 'rnelson0' Nelson
1719

18-
class puppet::unicorn () {
20+
class puppet::unicorn (
21+
$listen_address = '*',
22+
){
1923
include nginx
2024
# install unicorn
2125
unless defined(Package['ruby-devel']) {

templates/puppetmaster

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ server {
2020
proxy_set_header X-Client-DN $ssl_client_s_dn;
2121
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
2222
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
23-
listen *:8140 ssl;
23+
listen <%= @listen_address %>:8140 ssl;
2424
root /var/empty;
2525
location / {
2626
proxy_pass http://puppetmaster_unicorn;

0 commit comments

Comments
 (0)