Skip to content

Commit

Permalink
Merge pull request #832 from sorreltree/remove_storeconfigs_warning_o…
Browse files Browse the repository at this point in the history
…n_puppet_apply

Remove storeconfigs warning on puppet apply
  • Loading branch information
3flex authored Jul 20, 2016
2 parents 265f864 + 03b4ac5 commit e54f4dc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions manifests/resource/upstream.pp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@
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":
Expand Down
12 changes: 12 additions & 0 deletions manifests/resource/upstream/collect.pp
Original file line number Diff line number Diff line change
@@ -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 |>>
}

0 comments on commit e54f4dc

Please sign in to comment.