puppet-nginx icon indicating copy to clipboard operation
puppet-nginx copied to clipboard

Rework of nginx::resource::geo for proper networks listing

Open KlavsKlavsen opened this issue 6 years ago • 1 comments

Currently resource::geo is like this:

#  nginx::resource::geo { 'client_network':
#    ensure          => present,
#    ranges          => false,
#    default         => extra,
#    proxy_recursive => false,
#    proxies         => [ '192.168.99.99' ],
#    networks        => {
#      '10.0.0.0/8'     => 'intra',
#      '172.16.0.0/12'  => 'intra',
#      '192.168.0.0/16' => 'intra',
#    }
#  }

the networks part - should IMHO be "turned around" - so it looks like "everything else":

#  networks    => {
#     intra => ['10.0.0.0/8', '172.16.0.0/12',  '192.168.0.0/16']

So one can just use an array (or if using it via hiera - can just use an alias hiera reference to a network hiera key.. (current way is pretty counterproductive).

Would you take a PR if I wrote it?

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet:
  • Ruby:
  • Distribution:
  • Module version:

How to reproduce (e.g Puppet code you use)

What are you seeing

What behaviour did you expect instead

Output log

Any additional information you'd like to impart

KlavsKlavsen avatar Jan 19 '18 14:01 KlavsKlavsen

We welcome PRs from anyone willing to provide them :grinning:

dhollinger avatar Jan 19 '18 15:01 dhollinger