From 5dbbda87e8bee8373445a1023e92897ae0cb4f6c Mon Sep 17 00:00:00 2001 From: Maxime VISONNEAU Date: Wed, 21 Nov 2018 19:03:15 +0000 Subject: [PATCH] Added hiera defaults configuration options for all resources --- manifests/init.pp | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index ba60712fb..78d39b54c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -167,19 +167,23 @@ ### END Service Configuration ### ### START Hiera Lookups ### - $geo_mappings = {}, - $string_mappings = {}, - $nginx_locations = {}, - $nginx_locations_defaults = {}, - $nginx_mailhosts = {}, - $nginx_mailhosts_defaults = {}, - $nginx_streamhosts = {}, - $nginx_upstreams = {}, - Nginx::UpstreamMemberDefaults $nginx_upstream_defaults = {}, - $nginx_servers = {}, - $nginx_servers_defaults = {}, - Boolean $purge_passenger_repo = true, - Boolean $add_listen_directive = $nginx::params::add_listen_directive, + Hash $geo_mappings = {}, + Hash $geo_mappings_defaults = {}, + Hash $string_mappings = {}, + Hash $string_mappings_defaults = {}, + Hash $nginx_locations = {}, + Hash $nginx_locations_defaults = {}, + Hash $nginx_mailhosts = {}, + Hash $nginx_mailhosts_defaults = {}, + Hash $nginx_servers = {}, + Hash $nginx_servers_defaults = {}, + Hash $nginx_streamhosts = {}, + Hash $nginx_streamhosts_defaults = {}, + Hash $nginx_upstreams = {}, + Nginx::UpstreamMemberDefaults $nginx_upstreams_defaults = {}, + Boolean $purge_passenger_repo = true, + Boolean $add_listen_directive = $nginx::params::add_listen_directive, + ### END Hiera Lookups ### ) inherits nginx::params { @@ -187,13 +191,13 @@ contain 'nginx::config' contain 'nginx::service' - create_resources('nginx::resource::upstream', $nginx_upstreams, $nginx_upstream_defaults) - create_resources('nginx::resource::server', $nginx_servers, $nginx_servers_defaults) - create_resources('nginx::resource::location', $nginx_locations, $nginx_locations_defaults) - create_resources('nginx::resource::mailhost', $nginx_mailhosts, $nginx_mailhosts_defaults) - create_resources('nginx::resource::streamhost', $nginx_streamhosts) - create_resources('nginx::resource::map', $string_mappings) - create_resources('nginx::resource::geo', $geo_mappings) + create_resources( 'nginx::resource::geo', $geo_mappings, $geo_mappings_defaults ) + create_resources( 'nginx::resource::location', $nginx_locations, $nginx_locations_defaults ) + create_resources( 'nginx::resource::mailhost', $nginx_mailhosts, $nginx_mailhosts_defaults ) + create_resources( 'nginx::resource::map', $string_mappings, $string_mappings_defaults ) + create_resources( 'nginx::resource::server', $nginx_servers, $nginx_servers_defaults ) + create_resources( 'nginx::resource::streamhost', $nginx_streamhosts, $nginx_streamhosts_defaults ) + create_resources( 'nginx::resource::upstream', $nginx_upstreams, $nginx_upstreams_defaults ) # Allow the end user to establish relationships to the "main" class # and preserve the relationship to the implementation classes through