jfryman/puppet-nginx — pull request #331 by rainopik (2014-06-07 02:29:44+00:00)
Title: Upstream members can be exported and collected

This patch allows to declare upstream members on actual member servers.
I wanted a way to dynamically populate the *members* array as I spin up additional member servers (similar to haproxy::balancermember), but could not find any better way.
I've split the *upstream.erb* template into several parts and made the *members* parameter optional. If *members* is omitted, at least one upstream member should be declared (or the nginx will complain on reload).

Example:
```puppet
# Export the resource on an upstream member server:
@@nginx::resource::upstream::member { $::fqdn:
upstream => 'proxypass',
server => $::ipaddress,
port => '3000',
}

# Collect resources on the NGINX server:
nginx::resource::upstream { 'proxypass':
ensure => present,
}
```