Skip to content

Commit

Permalink
Merge pull request voxpupuli#1080 from mvisonneau/hiera_defaults
Browse files Browse the repository at this point in the history
Add hiera defaults configuration options for all resources
  • Loading branch information
bastelfreak authored Feb 9, 2019
2 parents 42255e8 + 5dbbda8 commit b4b8a95
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 b4b8a95

Please sign in to comment.