Separate upstream member collection into separate module to kill storeconfig warn

This commit is contained in:
Michael Bacon 2016-07-14 17:50:32 -04:00
parent 265f864096
commit 03b4ac5ea3
2 changed files with 16 additions and 2 deletions

View file

@ -97,8 +97,10 @@ define nginx::resource::upstream (
content => template('nginx/conf.d/upstream_members.erb'),
}
} else {
# Collect exported members:
::Nginx::Resource::Upstream::Member <<| upstream == $name |>>
class { 'nginx::resource::upstream::collect':
# Collect exported members
upstream_name => $name,
}
}
concat::fragment { "${name}_upstream_footer":

View file

@ -0,0 +1,12 @@
# Class to collect exported upstream members, if needed.
#
# This is separated into a separate class in order to remove errors if
# storeconfigs are unavailable.
class nginx::resource::upstream::collect (
$upstream_name,
)
{
# Collect exported members:
::Nginx::Resource::Upstream::Member <<| upstream == $upstream_name |>>
}