|
1 | | -# define: nginx::resource::geo |
| 1 | +# @summary Create a new geo mapping entry for NGINX |
2 | 2 | # |
3 | | -# This definition creates a new geo mapping entry for NGINX |
| 3 | +# @param networks |
| 4 | +# Hash of geo lookup keys and resultant values |
4 | 5 | # |
5 | | -# Parameters: |
6 | | -# [*networks*] - Hash of geo lookup keys and resultant values |
7 | | -# [*default*] - Sets the resulting value if the source value fails to |
8 | | -# match any of the variants. |
9 | | -# [*ensure*] - Enables or disables the specified location |
10 | | -# [*ranges*] - Indicates that lookup keys (network addresses) are |
11 | | -# specified as ranges. |
12 | | -# [*address*] - Nginx defaults to using $remote_addr for testing. |
13 | | -# This allows you to override that with another variable |
14 | | -# name (automatically prefixed with $) |
15 | | -# [*delete*] - deletes the specified network (see: geo module docs) |
16 | | -# [*proxy_recursive*] - Changes the behavior of address acquisition when |
17 | | -# specifying trusted proxies via 'proxies' directive |
18 | | -# [*proxies*] - Hash of network->value mappings. |
| 6 | +# @param default |
| 7 | +# Sets the resulting value if the source value fails to match any of the |
| 8 | +# variants. |
19 | 9 | # |
20 | | -# Actions: |
| 10 | +# @param ensure |
| 11 | +# Enables or disables the specified location |
21 | 12 | # |
22 | | -# Requires: |
| 13 | +# @param ranges |
| 14 | +# Indicates that lookup keys (network addresses) are specified as ranges. |
23 | 15 | # |
24 | | -# Sample Usage: |
| 16 | +# @param address |
| 17 | +# Nginx defaults to using $remote_addr for testing. This allows you to |
| 18 | +# override that with another variable name (automatically prefixed with $) |
25 | 19 | # |
26 | | -# nginx::resource::geo { 'client_network': |
27 | | -# ensure => present, |
28 | | -# ranges => false, |
29 | | -# default => extra, |
30 | | -# proxy_recursive => false, |
31 | | -# proxies => [ '192.168.99.99' ], |
32 | | -# networks => { |
33 | | -# '10.0.0.0/8' => 'intra', |
34 | | -# '172.16.0.0/12' => 'intra', |
35 | | -# '192.168.0.0/16' => 'intra', |
36 | | -# } |
37 | | -# } |
| 20 | +# @param delete |
| 21 | +# deletes the specified network (see: geo module docs) |
38 | 22 | # |
39 | | -# Sample Hiera usage: |
| 23 | +# @param proxy_recursive |
| 24 | +# Changes the behavior of address acquisition when specifying trusted |
| 25 | +# proxies via 'proxies' directive |
40 | 26 | # |
41 | | -# nginx::geo_mappings: |
42 | | -# client_network: |
43 | | -# ensure: present |
44 | | -# ranges: false |
45 | | -# default: 'extra' |
46 | | -# proxy_recursive: false |
47 | | -# proxies: |
48 | | -# - 192.168.99.99 |
49 | | -# networks: |
50 | | -# '10.0.0.0/8': 'intra' |
51 | | -# '172.16.0.0/12': 'intra' |
52 | | -# '192.168.0.0/16': 'intra' |
53 | | - |
| 27 | +# @param proxies |
| 28 | +# Hash of network->value mappings. |
| 29 | +# |
| 30 | +# @example Puppet usage |
| 31 | +# nginx::resource::geo { 'client_network': |
| 32 | +# ensure => present, |
| 33 | +# ranges => false, |
| 34 | +# default => extra, |
| 35 | +# proxy_recursive => false, |
| 36 | +# proxies => [ '192.168.99.99' ], |
| 37 | +# networks => { |
| 38 | +# '10.0.0.0/8' => 'intra', |
| 39 | +# '172.16.0.0/12' => 'intra', |
| 40 | +# '192.168.0.0/16' => 'intra', |
| 41 | +# } |
| 42 | +# } |
| 43 | +# |
| 44 | +# @example Hiera usage |
| 45 | +# nginx::geo_mappings: |
| 46 | +# client_network: |
| 47 | +# ensure: present |
| 48 | +# ranges: false |
| 49 | +# default: 'extra' |
| 50 | +# proxy_recursive: false |
| 51 | +# proxies: |
| 52 | +# - 192.168.99.99 |
| 53 | +# networks: |
| 54 | +# '10.0.0.0/8': 'intra' |
| 55 | +# '172.16.0.0/12': 'intra' |
| 56 | +# '192.168.0.0/16': 'intra' |
54 | 57 | define nginx::resource::geo ( |
55 | 58 | Hash $networks, |
56 | 59 | Optional[String] $default = undef, |
|
0 commit comments