Skip to content

Commit

Permalink
Added hiera defaults configuration options for all resources
Browse files Browse the repository at this point in the history
  • Loading branch information
mvisonneau authored and bastelfreak committed Feb 9, 2019
1 parent 42255e8 commit 5dbbda8
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,33 +167,37 @@
### 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 {

contain 'nginx::package'
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
Expand Down

0 comments on commit 5dbbda8

Please sign in to comment.