nginx
: Manage NGINX
nginx::config
: Manage NGINX bootstrap and configurationnginx::package
: Manage NGINX package installationnginx::package::debian
: Manage NGINX package installation on debian based systemsnginx::package::redhat
: Manage NGINX package installation on RedHat based systemsnginx::params
: default settings and according to operating systemnginx::service
: Manage NGINX service management
nginx::resource::geo
: Create a new geo mapping entry for NGINXnginx::resource::location
: Create a new location entry within a virtual hostnginx::resource::mailhost
: Define a mailhostnginx::resource::map
: Create a new mapping entry for NGINXnginx::resource::server
: Create a virtual hostnginx::resource::snippet
: Create a reusable config snippet that can be included by other resourcesnginx::resource::streamhost
: Create a virtual steamhostnginx::resource::upstream
: Create a new upstream proxy entry for NGINXnginx::resource::upstream::member
: Create an upstream member inside the upstream block.
Nginx::DebugConnection
Nginx::ErrorLogSeverity
Nginx::Size
Nginx::Time
Nginx::UpstreamCustomParameters
Nginx::UpstreamDefaults
Nginx::UpstreamLeastTime
Nginx::UpstreamLeastTimeHttp
Nginx::UpstreamLeastTimeStream
Nginx::UpstreamMember
Nginx::UpstreamMemberDefaults
Nginx::UpstreamMemberServer
Nginx::UpstreamMembers
Nginx::UpstreamSticky
Nginx::UpstreamStickyZone
Nginx::UpstreamZone
Packaged NGINX
- RHEL: EPEL or custom package
- Debian/Ubuntu: Default Install or custom package
- SuSE: Default Install or custom package
include nginx
The following parameters are available in the nginx
class:
include_modules_enabled
passenger_package_name
nginx_version
debug_connections
service_config_check
service_config_check_command
client_body_temp_path
confd_only
confd_purge
conf_dir
daemon
daemon_user
daemon_group
dynamic_modules
global_owner
global_group
global_mode
limit_req_zone
log_dir
log_user
log_group
log_mode
http_access_log
http_format_log
nginx_error_log
nginx_error_log_severity
pid
proxy_temp_path
root_group
run_dir
sites_available_owner
sites_available_group
sites_available_mode
super_user
temp_dir
server_purge
conf_template
absolute_redirect
accept_mutex
accept_mutex_delay
client_body_buffer_size
client_max_body_size
client_body_timeout
send_timeout
lingering_timeout
lingering_close
lingering_time
etag
events_use
fastcgi_cache_inactive
fastcgi_cache_key
fastcgi_cache_keys_zone
fastcgi_cache_levels
fastcgi_cache_max_size
fastcgi_cache_path
fastcgi_cache_use_stale
gzip
gzip_buffers
gzip_comp_level
gzip_disable
gzip_min_length
gzip_http_version
gzip_proxied
gzip_types
gzip_vary
gzip_static
http_cfg_prepend
http_cfg_append
http_raw_prepend
http_raw_append
http_tcp_nodelay
http_tcp_nopush
keepalive_timeout
keepalive_requests
log_format
mail
mime_types_path
stream
multi_accept
names_hash_bucket_size
names_hash_max_size
nginx_cfg_prepend
proxy_buffers
proxy_buffer_size
proxy_cache_inactive
proxy_cache_keys_zone
proxy_cache_levels
proxy_cache_max_size
proxy_cache_path
proxy_cache_loader_files
proxy_cache_loader_sleep
proxy_cache_loader_threshold
proxy_use_temp_path
proxy_connect_timeout
proxy_headers_hash_bucket_size
proxy_http_version
proxy_read_timeout
proxy_redirect
proxy_send_timeout
proxy_set_header
proxy_hide_header
proxy_pass_header
proxy_ignore_header
proxy_max_temp_file_size
proxy_busy_buffers_size
sendfile
server_tokens
spdy
http2
ssl_stapling
ssl_stapling_verify
snippets_dir
manage_snippets_dir
types_hash_bucket_size
types_hash_max_size
worker_connections
ssl_prefer_server_ciphers
worker_processes
worker_rlimit_nofile
ssl_protocols
ssl_ciphers
ssl_dhparam
ssl_ecdh_curve
ssl_session_cache
ssl_session_timeout
ssl_session_tickets
ssl_session_ticket_key
ssl_buffer_size
ssl_crl
ssl_stapling_file
ssl_stapling_responder
ssl_trusted_certificate
ssl_verify_depth
ssl_password_file
package_ensure
package_name
package_source
package_flavor
manage_repo
mime_types
mime_types_preserve_defaults
repo_release
passenger_package_ensure
repo_source
service_ensure
service_enable
service_flags
service_restart
service_name
service_manage
geo_mappings
geo_mappings_defaults
string_mappings
string_mappings_defaults
nginx_locations
nginx_locations_defaults
nginx_mailhosts
nginx_mailhosts_defaults
nginx_servers
nginx_servers_defaults
nginx_streamhosts
nginx_streamhosts_defaults
nginx_upstreams
nginx_upstreams_defaults
purge_passenger_repo
Data type: Boolean
When set, nginx will include module configurations files installed in the /etc/nginx/modules-enabled directory.
Default value: $nginx::params::include_modules_enabled
Data type: String[1]
The name of the package to install in order for the passenger module of nginx being usable.
Default value: $nginx::params::passenger_package_name
Data type: String[1]
The version of nginx installed (or being installed). Unfortunately, different versions of nginx may need configuring differently. The default is derived from the version of nginx already installed. If the fact is unavailable, it defaults to '1.6.0'. You may need to set this manually to get a working and idempotent configuration.
Default value: pick(fact('nginx_version'), '1.6.0')
Data type: Array[Nginx::DebugConnection]
Configures nginx debug_connection
lines in the events
section of the nginx config.
See http://nginx.org/en/docs/ngx_core_module.html#debug_connection
Default value: []
Data type: Boolean
whether to en- or disable the config check via nginx -t on config changes
Default value: false
Data type: String
Command to execute to validate the generated configuration.
Default value: 'nginx -t'
Data type: Variant[Stdlib::Absolutepath, Boolean]
Default value: $nginx::params::client_body_temp_path
Data type: Boolean
Default value: false
Data type: Boolean
Default value: false
Data type: Any
Default value: $nginx::params::conf_dir
Data type: Optional[Enum['on', 'off']]
Default value: undef
Data type: Any
Default value: $nginx::params::daemon_user
Data type: Any
Default value: undef
Data type: Array[String]
Default value: []
Data type: Any
Default value: $nginx::params::global_owner
Data type: Any
Default value: $nginx::params::global_group
Data type: Any
Default value: $nginx::params::global_mode
Data type: Optional[Variant[String[1], Array[String[1]]]]
Default value: undef
Data type: Stdlib::Absolutepath
Default value: $nginx::params::log_dir
Data type: String[1]
Default value: $nginx::params::log_user
Data type: String[1]
Default value: $nginx::params::log_group
Data type: Stdlib::Filemode
Default value: $nginx::params::log_mode
Data type: Variant[String, Array[String]]
Default value: "${log_dir}/${nginx::params::http_access_log_file}"
Data type: Any
Default value: undef
Data type: Variant[String, Array[String]]
Default value: "${log_dir}/${nginx::params::nginx_error_log_file}"
Data type: Nginx::ErrorLogSeverity
Default value: 'error'
Data type: Any
Default value: $nginx::params::pid
Data type: Variant[Stdlib::Absolutepath, Boolean]
Default value: $nginx::params::proxy_temp_path
Data type: Any
Default value: $nginx::params::root_group
Data type: Any
Default value: $nginx::params::run_dir
Data type: Any
Default value: $nginx::params::sites_available_owner
Data type: Any
Default value: $nginx::params::sites_available_group
Data type: Any
Default value: $nginx::params::sites_available_mode
Data type: Boolean
Default value: $nginx::params::super_user
Data type: Any
Default value: $nginx::params::temp_dir
Data type: Boolean
Default value: false
Data type: Any
Default value: 'nginx/conf.d/nginx.conf.erb'
Data type: Optional[Enum['on', 'off']]
Default value: undef
Data type: Enum['on', 'off']
Default value: 'on'
Data type: Any
Default value: '500ms'
Data type: Any
Default value: '128k'
Data type: String
Default value: '10m'
Data type: Any
Default value: '60s'
Data type: Any
Default value: '60s'
Data type: Any
Default value: '5s'
Data type: Optional[Enum['on','off','always']]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[Enum['on', 'off']]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: String
Default value: '20m'
Data type: Optional[String]
Default value: undef
Data type: String
Default value: 'd3:100m'
Data type: String
Default value: '1'
Data type: String
Default value: '500m'
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Enum['on', 'off']
Default value: 'off'
Data type: Any
Default value: undef
Data type: Any
Default value: 1
Data type: Any
Default value: 'msie6'
Data type: Any
Default value: 20
Data type: Any
Default value: 1.1
Data type: Any
Default value: 'off'
Data type: Any
Default value: undef
Data type: Enum['on', 'off']
Default value: 'off'
Data type: Optional[Enum['on', 'off', 'always']]
Default value: undef
Data type: Optional[Variant[Hash, Array]]
Default value: undef
Data type: Optional[Variant[Hash, Array]]
Default value: undef
Data type: Optional[Variant[Array[String], String]]
Default value: undef
Data type: Optional[Variant[Array[String], String]]
Default value: undef
Data type: Enum['on', 'off']
Default value: 'on'
Data type: Enum['on', 'off']
Default value: 'off'
Data type: Any
Default value: '65s'
Data type: Any
Default value: '100'
Data type: Any
Default value: {}
Data type: Boolean
Default value: false
Data type: Variant[String, Boolean]
Default value: 'mime.types'
Data type: Boolean
Default value: false
Data type: String
Default value: 'off'
Data type: Integer
Default value: 64
Data type: Integer
Default value: 512
Data type: Any
Default value: false
Data type: String
Default value: '32 4k'
Data type: String
Default value: '8k'
Data type: String
Default value: '20m'
Data type: String
Default value: 'd2:100m'
Data type: String
Default value: '1'
Data type: String
Default value: '500m'
Data type: Optional[Variant[Hash, String]]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Enum['on', 'off']]
Default value: undef
Data type: Any
Default value: '90s'
Data type: Integer
Default value: 64
Data type: Optional[String]
Default value: undef
Data type: Any
Default value: '90s'
Data type: Any
Default value: undef
Data type: Any
Default value: '90s'
Data type: Array
Default value: [ 'Host $host', 'X-Real-IP $remote_addr', 'X-Forwarded-For $proxy_add_x_forwarded_for', 'Proxy ""', ]
Data type: Array
Default value: []
Data type: Array
Default value: []
Data type: Array
Default value: []
Data type: Optional[Nginx::Size]
Default value: undef
Data type: Optional[Nginx::Size]
Default value: undef
Data type: Enum['on', 'off']
Default value: 'on'
Data type: Enum['on', 'off']
Default value: 'on'
Data type: Enum['on', 'off']
Default value: 'off'
Data type: Enum['on', 'off']
Default value: 'off'
Data type: Enum['on', 'off']
Default value: 'off'
Data type: Enum['on', 'off']
Default value: 'off'
Data type: Stdlib::Absolutepath
Default value: $nginx::params::snippets_dir
Data type: Boolean
Default value: true
Data type: Any
Default value: '512'
Data type: Any
Default value: '1024'
Data type: Integer
Default value: 1024
Data type: Enum['on', 'off']
Default value: 'on'
Data type: Variant[Integer, Enum['auto']]
Default value: 'auto'
Data type: Integer
Default value: 1024
Data type: String
Default value: 'TLSv1 TLSv1.1 TLSv1.2'
Data type: String
Default value: 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS'
Data type: Optional[Stdlib::Unixpath]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: String
Default value: 'shared:SSL:10m'
Data type: String
Default value: '5m'
Data type: Optional[Enum['on', 'off']]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Integer]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Any
Default value: present
Data type: Any
Default value: $nginx::params::package_name
Data type: Any
Default value: 'nginx'
Data type: Any
Default value: undef
Data type: Boolean
Default value: $nginx::params::manage_repo
Data type: Hash[String[1], String[1]]
Default value: $nginx::params::mime_types
Data type: Boolean
Default value: false
Data type: Optional[String]
Default value: undef
Data type: Any
Default value: 'present'
Data type: Optional[Stdlib::HTTPUrl]
Default value: undef
Data type: Stdlib::Ensure::Service
Default value: 'running'
Data type: Any
Default value: true
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: 'nginx'
Data type: Any
Default value: true
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Nginx::UpstreamDefaults
Default value: {}
Data type: Boolean
Default value: true
Create a new geo mapping entry for NGINX
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',
}
}
nginx::geo_mappings:
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 following parameters are available in the nginx::resource::geo
defined type:
Data type: Hash
Hash of geo lookup keys and resultant values
Data type: Optional[String]
Sets the resulting value if the source value fails to match any of the variants.
Default value: undef
Data type: Enum['present', 'absent']
Enables or disables the specified location
Default value: 'present'
Data type: Boolean
Indicates that lookup keys (network addresses) are specified as ranges.
Default value: false
Data type: Optional[String]
Nginx defaults to using
Default value: undef
Data type: Optional[String]
deletes the specified network (see: geo module docs)
Default value: undef
Data type: Optional[Boolean]
Changes the behavior of address acquisition when specifying trusted proxies via 'proxies' directive
Default value: undef
Data type: Optional[Array]
Hash of network->value mappings.
Default value: undef
Create a new location entry within a virtual host
nginx::resource::location { 'test2.local-bob':
ensure => present,
www_root => '/var/www/bob',
location => '/bob',
server => 'test2.local',
}
nginx::resource::location { 'test2.local-bob':
ensure => present,
www_root => '/var/www/bob',
location => '/bob',
server => ['test1.local','test2.local'],
}
Custom config example to limit location on localhost, create a hash with any extra custom config you want.
$my_config = {
'access_log' => 'off',
'allow' => '127.0.0.1',
'deny' => 'all'
}
nginx::resource::location { 'test2.local-bob':
ensure => present,
www_root => '/var/www/bob',
location => '/bob',
server => 'test2.local',
location_cfg_append => $my_config,
}
nginx::resource::location { 'test2.local-bob':
ensure => present,
www_root => '/var/www/bob',
location => '/bob',
server => 'test2.local',
fastcgi_param => {
'APP_ENV' => 'local',
}
}
nginx::resource::location { 'test2.local-bob':
ensure => present,
www_root => '/var/www/bob',
location => '/bob',
server => 'test2.local',
uwsgi_param => {
'APP_ENV' => 'local',
}
}
The following parameters are available in the nginx::resource::location
defined type:
ensure
internal
server
location
location_satisfy
location_allow
location_deny
www_root
autoindex
autoindex_exact_size
autoindex_format
autoindex_localtime
index_files
proxy
proxy_redirect
proxy_read_timeout
proxy_connect_timeout
proxy_send_timeout
proxy_set_header
proxy_hide_header
proxy_pass_header
proxy_ignore_header
proxy_next_upstream
fastcgi
fastcgi_param
fastcgi_params
fastcgi_script
fastcgi_split_path
uwsgi
uwsgi_param
uwsgi_params
uwsgi_read_timeout
ssl
ssl_only
location_alias
stub_status
raw_prepend
raw_append
limit_zone
location_custom_cfg
location_cfg_prepend
location_custom_cfg_prepend
location_custom_cfg_append
location_cfg_append
include
try_files
proxy_cache
proxy_cache_key
proxy_cache_use_stale
proxy_cache_valid
proxy_cache_lock
proxy_cache_bypass
proxy_method
proxy_http_version
proxy_set_body
proxy_buffering
proxy_request_buffering
proxy_max_temp_file_size
proxy_busy_buffers_size
absolute_redirect
auth_basic
auth_basic_user_file
auth_request
priority
mp4
flv
expires
add_header
gzip_static
fastcgi_index
rewrite_rules
Data type: Enum['present', 'absent']
Enables or disables the specified location (present|absent)
Default value: 'present'
Data type: Boolean
Indicates whether or not this location can be used for internal requests only. Default: false
Default value: false
Data type: Variant[String[1],Array[String[1],1]]
Defines a server or list of servers that include this location
Default value: undef
Data type: String
Specifies the URI associated with this location entry
Default value: $name
Data type: Optional[Enum['any', 'all']]
Allows access if all (all) or at least one (any) of the auth modules allow access.
Default value: undef
Data type: Optional[Array]
Locations to allow connections from.
Default value: undef
Data type: Optional[Array]
Locations to deny connections from.
Default value: undef
Data type: Optional[String]
Specifies the location on disk for files to be read from. Cannot be set in conjunction with $proxy
Default value: undef
Data type: Optional[String]
Set it on 'on' to activate autoindex directory listing.
Default value: undef
Data type: Optional[Enum['on', 'off']]
Set it on 'on' or 'off' to activate/deactivate autoindex displaying exact filesize, or rounded to kilobytes, megabytes and gigabytes.
Default value: undef
Data type: Optional[Enum['html', 'xml', 'json', 'jsonp']]
Sets the format of a directory listing.
Default value: undef
Data type: Optional[Enum['on', 'off']]
Specifies whether times in the directory listing should be output in the local time zone or UTC.
Default value: undef
Data type: Array
Default index files for NGINX to read when traversing a directory
Default value: [ 'index.html', 'index.htm', 'index.php', ]
Data type: Optional[String]
Proxy server(s) for a location to connect to. Accepts a single value, can be used in conjunction with nginx::resource::upstream
Default value: undef
Data type: Optional[String]
sets the text, which must be changed in response-header "Location" and "Refresh" in the response of the proxied server.
Default value: $nginx::proxy_redirect
Data type: String
Override the default the proxy read timeout value of 90 seconds
Default value: $nginx::proxy_read_timeout
Data type: String
Override the default the proxy connect timeout value of 90 seconds
Default value: $nginx::proxy_connect_timeout
Data type: String
Override the default the proxy send timeout value of 90 seconds
Default value: $nginx::proxy_send_timeout
Data type: Array
Array of server headers to set
Default value: $nginx::proxy_set_header
Data type: Array
Array of server headers to hide
Default value: $nginx::proxy_hide_header
Data type: Array
Array of server headers to pass
Default value: $nginx::proxy_pass_header
Data type: Array
Array of server headers to ignore
Default value: $nginx::proxy_ignore_header
Data type: Optional[String]
Specify cases a request should be passed to the next server in the upstream.
Default value: undef
Data type: Optional[String]
location of fastcgi (host:port)
Default value: undef
Data type: Optional[Hash]
Set additional custom fastcgi_params
Default value: undef
Data type: String
optional alternative fastcgi_params file to use
Default value: "${nginx::conf_dir}/fastcgi.conf"
Data type: Optional[String]
optional SCRIPT_FILE parameter
Default value: undef
Data type: Optional[String]
Allows settings of fastcgi_split_path_info so that you can split the script_name and path_info via regex
Default value: undef
Data type: Optional[String]
location of uwsgi (host:port)
Default value: undef
Data type: Optional[Hash]
Set additional custom uwsgi_params
Default value: undef
Data type: String
optional alternative uwsgi_params file to use
Default value: "${nginx::config::conf_dir}/uwsgi_params"
Data type: Optional[String]
optional value for uwsgi_read_timeout
Default value: undef
Data type: Boolean
Indicates whether to setup SSL bindings for this location.
Default value: false
Data type: Boolean
Required if the SSL and normal server have the same port.
Default value: false
Data type: Optional[String]
Path to be used as basis for serving requests for this location
Default value: undef
Data type: Optional[Boolean]
If true it will point configure module stub_status to provide nginx stats on location
Default value: undef
Data type: Optional[Variant[String, Array]]
A single string, or an array of strings to prepend to the location directive (after custom_cfg directives). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: undef
Data type: Optional[Variant[String, Array]]
A single string, or an array of strings to append to the location directive (after custom_cfg directives). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: undef
Data type: Optional[String[1]]
Apply a limit_req_zone to the location. Expects a string indicating a previously defined limit_req_zone in the main nginx configuration
Default value: undef
Data type: Optional[Hash]
Expects a hash with custom directives, cannot be used with other location types (proxy, fastcgi, root, or stub_status)
Default value: undef
Data type: Optional[Hash]
Expects a hash with extra directives to put before anything else inside location (used with all other types except custom_cfg)
Default value: undef
Data type: Optional[Hash]
Expects a array with extra directives to put before anything else inside location (used with all other types except custom_cfg). Used for logical structures such as if.
Default value: undef
Data type: Optional[Hash]
Expects a array with extra directives to put after anything else inside location (used with all other types except custom_cfg). Used for logical structures such as if.
Default value: undef
Data type: Optional[Hash]
Expects a hash with extra directives to put after everything else inside location (used with all other types except custom_cfg)
Default value: undef
Data type: Optional[Array]
An array of files to include for this location
Default value: undef
Data type: Optional[Array]
An array of file locations to try
Default value: undef
Data type: Optional[String]
This directive sets name of zone for caching. The same zone can be used in multiple places.
Default value: undef
Data type: Optional[String]
Override the default proxy_cache_key of $scheme$proxy_host$request_uri
Default value: undef
Data type: Optional[String]
Override the default proxy_cache_use_stale value of off.
Default value: undef
Data type: Optional[Variant[Array, String]]
This directive sets the time for caching different replies.
Default value: undef
Data type: Optional[Enum['on', 'off']]
This directive sets the locking mechanism for pouplating cache.
Default value: undef
Data type: Optional[Variant[Array, String]]
Defines conditions which the response will not be cached
Default value: undef
Data type: Optional[String]
If defined, overrides the HTTP method of the request to be passed to the backend.
Default value: undef
Data type: Optional[String]
Sets the proxy http version
Default value: undef
Data type: Optional[String]
If defined, sets the body passed to the backend.
Default value: undef
Data type: Optional[Enum['on', 'off']]
If defined, sets the proxy_buffering to the passed value.
Default value: undef
Data type: Optional[Enum['on', 'off']]
If defined, sets the proxy_request_buffering to the passed value.
Default value: undef
Data type: Optional[Nginx::Size]
Sets the maximum size of the temporary buffer file.
Default value: undef
Data type: Optional[Nginx::Size]
Sets the total size of buffers that can be busy sending a response to the client while the response is not yet fully read.
Default value: undef
Data type: Optional[Enum['on', 'off']]
Enables or disables the absolute redirect functionality of nginx
Default value: undef
Data type: Optional[String]
This directive includes testing name and password with HTTP Basic Authentication.
Default value: undef
Data type: Optional[String]
This directive sets the htpasswd filename for the authentication realm.
Default value: undef
Data type: Optional[String]
This allows you to specify a custom auth endpoint
Default value: undef
Data type: Integer[401,599]
Location priority. User priority 401-499, 501-599. If the priority is higher than the default priority (500), the location will be defined after root, or before root.
Default value: 500
Data type: Boolean
Indicates whether or not this loation can be used for mp4 streaming. Default: false
Default value: false
Data type: Boolean
Indicates whether or not this loation can be used for flv streaming. Default: false
Default value: false
Data type: Optional[String]
Setup expires time for locations content
Default value: undef
Data type: Hash
Adds headers to the location block. If any are specified, locations will no longer inherit headers from the parent server context
Default value: {}
Data type: Optional[Enum['on', 'off', 'always']]
Defines gzip_static, nginx default is off
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Array
Default value: []
Define a mailhost
nginx::resource::mailhost { 'domain1.example':
ensure => present,
auth_http => 'server2.example/cgi-bin/auth',
protocol => 'smtp',
listen_port => 587,
ssl_port => 465,
starttls => 'only',
xclient => 'off',
ssl => true,
ssl_cert => '/tmp/server.crt',
ssl_key => '/tmp/server.pem',
}
The following parameters are available in the nginx::resource::mailhost
defined type:
ensure
listen_ip
listen_port
listen_options
ipv6_enable
ipv6_listen_ip
ipv6_listen_port
ipv6_listen_options
ssl
ssl_cert
ssl_ciphers
ssl_client_cert
ssl_crl
ssl_dhparam
ssl_ecdh_curve
ssl_key
ssl_password_file
ssl_port
ssl_prefer_server_ciphers
ssl_protocols
ssl_session_cache
ssl_session_ticket_key
ssl_session_tickets
ssl_session_timeout
ssl_trusted_cert
ssl_verify_depth
starttls
protocol
auth_http
xclient
imap_auth
imap_capabilities
imap_client_buffer
pop3_auth
pop3_capabilities
smtp_auth
smtp_capabilities
proxy_pass_error_message
server_name
raw_prepend
raw_append
mailhost_cfg_append
mailhost_cfg_prepend
auth_http_header
Data type: Enum['absent', 'present']
Enables or disables the specified mailhost
Default value: 'present'
Data type: Variant[Array[String], String]
Default IP Address for NGINX to listen with this server on. Defaults to all interfaces (*)
Default value: '*'
Data type: Stdlib::Port
Default IP Port for NGINX to listen with this server on.
Data type: Optional[String]
Extra options for listen directive like 'default' to catchall.
Default value: undef
Data type: Boolean
value to enable/disable IPv6 support (false|true). Module will check to see if IPv6 support exists on your system before enabling.
Default value: false
Data type: Variant[Array[String], String]
Default IPv6 Address for NGINX to listen with this server on. Defaults to all interfaces (::)
Default value: '::'
Data type: Stdlib::Port
Default IPv6 Port for NGINX to listen with this server on.
Default value: 80
Data type: String
Extra options for listen directive like 'default' to catchall. Template will allways add ipv6only=on. While issue voxpupuli#30 is discussed, default value is 'default'.
Default value: 'default ipv6only=on'
Data type: Boolean
Indicates whether to setup SSL bindings for this mailhost.
Default value: false
Data type: Optional[String]
Pre-generated SSL Certificate file to reference for SSL Support. This is not generated by this module.
Default value: undef
Data type: String
Override default SSL ciphers.
Default value: $nginx::ssl_ciphers
Data type: Optional[String]
Pre-generated SSL Certificate file to reference for client verify SSL Support. This is not generated by this module.
Default value: undef
Data type: Optional[String]
String: Specifies CRL path in file system
Default value: undef
Data type: Optional[String]
This directive specifies a file containing Diffie-Hellman key agreement protocol cryptographic parameters, in PEM format, utilized for exchanging session keys between server and client.
Default value: $nginx::ssl_dhparam
Data type: Optional[String]
This directive specifies a curve for ECDHE ciphers.
Default value: undef
Data type: Optional[String]
Pre-generated SSL Key file to reference for SSL Support. This is not generated by this module.
Default value: undef
Data type: Optional[String]
This directive specifies a file containing passphrases for secret keys.
Default value: undef
Data type: Optional[Stdlib::Port]
Default IP Port for NGINX to listen with this SSL server on.
Default value: undef
Data type: Enum['on', 'off']
Specifies that server ciphers should be preferred over client ciphers when using the SSLv3 and TLS protocols.
Default value: $nginx::ssl_prefer_server_ciphers
Data type: String
SSL protocols enabled.
Default value: $nginx::ssl_protocols
Data type: Optional[String]
Sets the type and size of the session cache.
Default value: undef
Data type: Optional[String]
This directive specifies a file containing secret key used to encrypt and decrypt TLS session tickets.
Default value: undef
Data type: Optional[String]
Whether to enable or disable session resumption through TLS session tickets.
Default value: undef
Data type: String
Specifies a time during which a client may reuse the session parameters stored in a cache.
Default value: '5m'
Data type: Optional[String]
Specifies a file with trusted CA certificates in the PEM format used to verify client certificates and OCSP responses if ssl_stapling is enabled.
Default value: undef
Data type: Optional[Integer]
Sets the verification depth in the client certificates chain.
Default value: undef
Data type: Enum['on', 'off', 'only']
Enable STARTTLS support
Default value: 'off'
Data type: Optional[Enum['imap', 'pop3', 'smtp']]
Mail protocol to use
Default value: undef
Data type: Optional[String]
With this directive you can set the URL to the external HTTP-like server for authorization.
Default value: undef
Data type: Enum['on', 'off']
Whether to use xclient for smtp
Default value: 'on'
Data type: Optional[String]
Sets permitted methods of authentication for IMAP clients.
Default value: undef
Data type: Optional[Array]
Sets the IMAP protocol extensions list that is passed to the client in response to the CAPA command.
Default value: undef
Data type: Optional[String]
Sets the IMAP commands read buffer size.
Default value: undef
Data type: Optional[String]
Sets permitted methods of authentication for POP3 clients.
Default value: undef
Data type: Optional[Array]
Sets the POP3 protocol extensions list that is passed to the client in response to the CAPA command.
Default value: undef
Data type: Optional[String]
Sets permitted methods of SASL authentication for SMTP clients.
Default value: undef
Data type: Optional[Array]
Sets the SMTP protocol extensions list that is passed to the client in response to the EHLO command.
Default value: undef
Data type: String
Indicates whether to pass the error message obtained during the authentication on the backend to the client.
Default value: 'off'
Data type: Array
List of mailhostnames for which this mailhost will respond.
Default value: [$name]
Data type: Optional[Variant[Array, String]]
A single string, or an array of strings to prepend to the server directive (after mailhost_cfg_prepend directive). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: undef
Data type: Optional[Variant[Array, String]]
A single string, or an array of strings to append to the server directive (after mailhost_cfg_append directive). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: undef
Data type: Optional[Hash]
It expects a hash with custom directives to put after everything else inside server
Default value: undef
Data type: Optional[Hash]
It expects a hash with custom directives to put before everything else inside server
Default value: undef
Data type: Optional[String]
Default value: undef
Create a new mapping entry for NGINX
nginx::resource::map { 'backend_pool':
ensure => present,
hostnames => true,
default => 'ny-pool-1,
string => '$http_host',
mappings => {
'*.nyc.example.com' => 'ny-pool-1',
'*.sf.example.com' => 'sf-pool-1',
}
}
nginx::resource::map { 'backend_pool':
...
mappings => [
{ 'key' => '*.sf.example.com', 'value' => 'sf-pool-1' },
{ 'key' => '*.nyc.example.com', 'value' => 'ny-pool-1' },
]
}
nginx::resource::map { 'redirections':
include_files => [ '/etc/nginx/conf.d/redirections.map']
}
nginx::string_mappings:
client_network:
ensure: present
hostnames: true
default: 'ny-pool-1'
string: $http_host
mappings:
'*.nyc.example.com': 'ny-pool-1'
'*.sf.example.com': 'sf-pool-1'
nginx::string_mappings:
client_network:
...
mappings:
- key: '*.sf.example.com'
value: 'sf-pool-1'
- key: '*.nyc.example.com'
value: 'ny-pool-1'
The following parameters are available in the nginx::resource::map
defined type:
Data type: Enum['absent', 'present']
Enables or disables the specified location
Default value: 'present'
Data type: Optional[String]
Sets the resulting value if the source values fails to match any of the variants.
Default value: undef
Data type: String[2]
Source string or variable to provide mapping for
Data type: Variant[Array, Hash]
Hash of map lookup keys and resultant values
Data type: Boolean
Indicates that source values can be hostnames with a prefix or suffix mask.
Default value: false
Data type: Array[String]
An array of external files to include
Default value: []
Data type: Enum['http', 'stream']
Specify if mapping is for http or stream context
Default value: 'http'
Create a virtual host
nginx::resource::server { 'test2.local':
ensure => present,
www_root => '/var/www/nginx-default',
ssl => true,
ssl_cert => '/tmp/server.crt',
ssl_key => '/tmp/server.pem',
}
The following parameters are available in the nginx::resource::server
defined type:
ensure
listen_ip
listen_port
listen_options
listen_unix_socket_enable
listen_unix_socket
listen_unix_socket_options
location_satisfy
location_allow
location_deny
ipv6_enable
ipv6_listen_ip
ipv6_listen_port
ipv6_listen_options
add_header
index_files
autoindex
autoindex_exact_size
autoindex_format
autoindex_localtime
proxy
proxy_read_timeout
proxy_send_timeout
proxy_redirect
proxy_buffering
proxy_request_buffering
proxy_max_temp_file_size
proxy_busy_buffers_size
resolver
fastcgi
fastcgi_param
fastcgi_params
fastcgi_index
fastcgi_script
uwsgi_read_timeout
ssl
ssl_cert
ssl_client_cert
ssl_verify_client
ssl_crl
ssl_dhparam
ssl_ecdh_curve
ssl_prefer_server_ciphers
ssl_redirect
ssl_redirect_port
ssl_key
ssl_port
ssl_protocols
ssl_buffer_size
ssl_ciphers
ssl_stapling
ssl_stapling_file
ssl_stapling_responder
ssl_stapling_verify
ssl_session_timeout
ssl_session_tickets
ssl_session_ticket_key
ssl_trusted_cert
ssl_verify_depth
ssl_password_file
spdy
http2
server_name
www_root
rewrite_www_to_non_www
rewrite_non_www_to_www
try_files
proxy_cache
proxy_cache_key
proxy_cache_use_stale
proxy_cache_valid
proxy_cache_lock
proxy_cache_bypass
proxy_method
proxy_http_version
proxy_set_body
absolute_redirect
auth_basic
auth_basic_user_file
auth_request
client_max_body_size
client_body_timeout
client_header_timeout
raw_prepend
raw_append
location_raw_prepend
location_raw_append
server_cfg_append
server_cfg_prepend
server_cfg_ssl_append
server_cfg_ssl_prepend
include_files
access_log
error_log
passenger_cgi_param
passenger_set_header
passenger_env_var
passenger_pre_start
log_by_lua
log_by_lua_file
gzip_types
gzip_static
owner
group
mode
maintenance
maintenance_value
error_pages
locations
locations_defaults
ssl_listen_option
ssl_cache
proxy_connect_timeout
proxy_set_header
proxy_hide_header
proxy_pass_header
uwsgi
uwsgi_params
location_custom_cfg
location_cfg_prepend
location_cfg_append
location_custom_cfg_prepend
location_custom_cfg_append
format_log
use_default_location
rewrite_rules
string_mappings
geo_mappings
Data type: Enum['absent', 'present']
Enables or disables the specified server
Default value: 'present'
Data type: Variant[Array, String]
Default IP Address for NGINX to listen with this server on. Defaults to all interfaces (*)
Default value: '*'
Data type: Integer
Default TCP Port for NGINX to listen with this server on.
Default value: 80
Data type: Optional[String]
Extra options for listen directive like 'default_server' to catchall.
Default value: undef
Data type: Boolean
value to enable/disable UNIX socket listening support.
Default value: false
Data type: Variant[Array[Stdlib::Absolutepath], Stdlib::Absolutepath]
Default unix socket for NGINX to listen with this server on.
Default value: '/var/run/nginx.sock'
Data type: Optional[String]
Extra options for listen directive like 'default' to catchall.
Default value: undef
Data type: Optional[Enum['any', 'all']]
Allows access if all (all) or at least one (any) of the auth modules allow access.
Default value: undef
Data type: Array
Locations to allow connections from.
Default value: []
Data type: Array
Locations to deny connections from.
Default value: []
Data type: Boolean
value to enable/disable IPv6 support (false|true). Module will check to see if IPv6 support exists on your system before enabling.
Default value: false
Data type: Variant[Array, String]
Default IPv6 Address for NGINX to listen with this server on. Defaults to all interfaces (::)
Default value: '::'
Data type: Integer
Default IPv6 Port for NGINX to listen with this server on. Defaults to TCP 80
Default value: 80
Data type: String
Extra options for listen directive like 'default' to catchall. Template will allways add ipv6only=on. While issue voxpupuli#30 is discussed, default value is 'default'.
Default value: 'default ipv6only=on'
Data type: Hash
Adds headers to the HTTP response when response code is equal to 200, 204, 301, 302 or 304.
Default value: {}
Data type: Array
Default index files for NGINX to read when traversing a directory
Default value: [ 'index.html', 'index.htm', 'index.php', ]
Data type: Optional[String]
Set it on 'on' or 'off 'to activate/deactivate autoindex directory listing.
Default value: undef
Data type: Optional[Enum['on', 'off']]
Set it on 'on' or 'off' to activate/deactivate autoindex displaying exact filesize, or rounded to kilobytes, megabytes and gigabytes.
Default value: undef
Data type: Optional[Enum['html', 'xml', 'json', 'jsonp']]
Sets the format of a directory listing.
Default value: undef
Data type: Optional[Enum['on', 'off']]
Specifies whether times in the directory listing should be output in the local time zone or UTC.
Default value: undef
Data type: Optional[String]
Proxy server(s) for the root location to connect to. Accepts a single value, can be used in conjunction with nginx::resource::upstream
Default value: undef
Data type: String
Override the default proxy read timeout value of 90 seconds
Default value: $nginx::proxy_read_timeout
Data type: String
Override the default proxy send timeout value of 90 seconds
Default value: $nginx::proxy_send_timeout
Data type: Optional[String]
Override the default proxy_redirect value of off.
Default value: undef
Data type: Optional[String]
If defined, sets the proxy_buffering to the passed value.
Default value: undef
Data type: Optional[String]
If defined, sets the proxy_request_buffering to the passed value.
Default value: undef
Data type: Optional[Nginx::Size]
Sets the maximum size of the temporary buffer file.
Default value: undef
Data type: Optional[Nginx::Size]
Sets the total size of buffers that can be busy sending a response to the client while the response is not yet fully read.
Default value: undef
Data type: Array
Configures name servers used to resolve names of upstream servers into addresses.
Default value: []
Data type: Optional[String]
location of fastcgi (host:port)
Default value: undef
Data type: Any
Set additional custom fastcgi_params
Default value: undef
Data type: String
optional alternative fastcgi_params file to use
Default value: "${nginx::conf_dir}/fastcgi.conf"
Data type: Optional[String]
optional FastCGI index page
Default value: undef
Data type: Optional[String]
optional SCRIPT_FILE parameter
Default value: undef
Data type: Optional[String]
optional value for uwsgi_read_timeout
Default value: undef
Data type: Boolean
Indicates whether to setup SSL bindings for this server.
Default value: false
Data type: Optional[Variant[String, Boolean]]
Pre-generated SSL Certificate file to reference for SSL Support. This is
not generated by this module. Set to false
to inherit from the http
section, which improves performance by conserving memory.
Default value: undef
Data type: Optional[String]
Pre-generated SSL Certificate file to reference for client verify SSL Support. This is not generated by this module.
Default value: undef
Data type: String
Enables verification of client certificates.
Default value: 'on'
Data type: Optional[String]
Specifies CRL path in file system
Default value: undef
Data type: Optional[String]
This directive specifies a file containing Diffie-Hellman key agreement protocol cryptographic parameters, in PEM format, utilized for exchanging session keys between server and client.
Default value: undef
Data type: Optional[String]
This directive specifies a curve for ECDHE ciphers.
Default value: undef
Data type: Optional[Enum['on', 'off']]
String: Specifies that server ciphers should be preferred over client ciphers when using the SSLv3 and TLS protocols.
Default value: undef
Data type: Boolean
Adds a server directive and return statement to force ssl redirect. Will honor ssl_port if it's set.
Default value: false
Data type: Optional[Integer]
Overrides $ssl_port in the SSL redirect set by ssl_redirect
Default value: undef
Data type: Optional[Variant[String, Boolean]]
Pre-generated SSL Key file to reference for SSL Support. This is not
generated by this module. Set to false
to inherit from the http section,
which improves performance by conserving memory.
Default value: undef
Data type: Integer
Default IP Port for NGINX to listen with this SSL server on.
Default value: 443
Data type: Optional[String]
SSL protocols enabled. Defaults to 'TLSv1 TLSv1.1 TLSv1.2'.
Default value: undef
Data type: Optional[String]
Sets the size of the buffer used for sending data.
Default value: undef
Data type: Optional[String]
SSL ciphers enabled.
Default value: undef
Data type: Boolean
Enables or disables stapling of OCSP responses by the server.
Default value: false
Data type: Optional[String]
When set, the stapled OCSP response will be taken from the specified file instead of querying the OCSP responder specified in the server certificate.
Default value: undef
Data type: Optional[String]
Overrides the URL of the OCSP responder specified in the Authority Information Access certificate extension.
Default value: undef
Data type: Boolean
Enables or disables verification of OCSP responses by the server. Defaults to false.
Default value: false
Data type: Optional[String]
Specifies a time during which a client may reuse the session parameters stored in a cache. Defaults to 5m.
Default value: undef
Data type: Optional[Enum['on', 'off']]
Enables or disables session resumption through TLS session tickets.
Default value: undef
Data type: Optional[String]
Sets a file with the secret key used to encrypt and decrypt TLS session tickets.
Default value: undef
Data type: Optional[String]
Specifies a file with trusted CA certificates in the PEM format used to verify client certificates and OCSP responses if ssl_stapling is enabled.
Default value: undef
Data type: Optional[Integer]
Sets the verification depth in the client certificates chain.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
File containing the password for the SSL Key file.
Default value: undef
Data type: Enum['on', 'off']
Toggles SPDY protocol.
Default value: $nginx::spdy
Data type: Enum['on', 'off']
Toggles HTTP/2 protocol.
Default value: $nginx::http2
Data type: Array[String]
List of servernames for which this server will respond. Default [$name].
Default value: [$name]
Data type: Optional[String]
Specifies the location on disk for files to be read from. Cannot be set in conjunction with $proxy
Default value: undef
Data type: Boolean
Adds a server directive and rewrite rule to rewrite www.domain.com to domain.com in order to avoid duplicate content (SEO);
Default value: false
Data type: Boolean
Adds a server directive and rewrite rule to rewrite domain.com to www.domain.com in order to avoid duplicate content (SEO);
Default value: false
Data type: Optional[Array[String]]
Specifies the locations for files to be checked as an array. Cannot be used in conjuction with $proxy.
Default value: undef
Data type: Optional[String]
This directive sets name of zone for caching. The same zone can be used in multiple places.
Default value: undef
Data type: Optional[String]
Override the default proxy_cache_key of $scheme$proxy_host$request_uri
Default value: undef
Data type: Optional[String]
Override the default proxy_cache_use_stale value of off.
Default value: undef
Data type: Optional[Variant[Array[String], String]]
This directive sets the time for caching different replies.
Default value: undef
Data type: Optional[Enum['on', 'off']]
This directive sets the locking mechanism for pouplating cache.
Default value: undef
Data type: Optional[Variant[Array[String], String]]
Defines conditions which the response will not be cached
Default value: undef
Data type: Optional[String]
If defined, overrides the HTTP method of the request to be passed to the backend.
Default value: undef
Data type: Optional[String]
Sets the proxy http version
Default value: undef
Data type: Optional[String]
If defined, sets the body passed to the backend.
Default value: undef
Data type: Optional[Enum['on', 'off']]
Enables or disables the absolute redirect functionality of nginx
Default value: undef
Data type: Optional[String]
This directive includes testing name and password with HTTP Basic Authentication.
Default value: undef
Data type: Optional[String]
This directive sets the htpasswd filename for the authentication realm.
Default value: undef
Data type: Optional[String]
This allows you to specify a custom auth endpoint
Default value: undef
Data type: Any
This directive sets client_max_body_size.
Default value: undef
Data type: Optional[String]
Sets how long the server will wait for a client body. Default is 60s
Default value: undef
Data type: Optional[String]
Sets how long the server will wait for a client header. Default is 60s
Default value: undef
Data type: Optional[Variant[Array[String], String]]
A single string, or an array of strings to prepend to the server directive (after cfg prepend directives). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: undef
Data type: Optional[Variant[Array[String], String]]
A single string, or an array of strings to append to the server directive (after cfg append directives). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: undef
Data type: Optional[Variant[Array[String], String]]
A single string, or an array of strings to prepend to the location directive (after custom_cfg directives). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: undef
Data type: Optional[Variant[Array[String], String]]
A single string, or an array of strings to append to the location directive (after custom_cfg directives). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: undef
Data type: Optional[Hash]
It expects a hash with custom directives to put after everything else inside server
Default value: undef
Data type: Optional[Hash]
It expects a hash with custom directives to put before everything else inside server
Default value: undef
Data type: Optional[Hash]
It expects a hash with custom directives to put after everything else inside server ssl
Default value: undef
Data type: Optional[Hash]
It expects a hash with custom directives to put before everything else inside server ssl
Default value: undef
Data type: Optional[Array[String]]
Adds include files to server
Default value: undef
Data type: Optional[Variant[String, Array]]
Where to write access log (log format can be set with $format_log). This can be either a string or an array; in the latter case, multiple lines will be created. Additionally, unlike the earlier behavior, setting it to 'absent' in the server context will remove this directive entirely from the server stanza, rather than setting a default. Can also be disabled for this server with the string 'off'.
Default value: undef
Data type: Optional[Variant[String, Array]]
Where to write error log. May add additional options like error level to the end. May set to 'absent', in which case it will be omitted in this server stanza (and default to nginx.conf setting)
Default value: undef
Data type: Optional[Hash]
Allows one to define additional CGI environment variables to pass to the backend application
Default value: undef
Data type: Optional[Hash]
Allows one to set headers to pass to the backend application (Passenger 5.0+)
Default value: undef
Data type: Optional[Hash]
Allows one to set environment variables to pass to the backend application (Passenger 5.0+)
Default value: undef
Data type: Optional[Variant[Array[String], String]]
Allows setting a URL to pre-warm the host. Per Passenger docs, the "domain part of the URL" must match a value of server_name. If this is an array, multiple URLs can be specified.
Default value: undef
Data type: Optional[String]
Run the Lua source code inlined as the at the log request processing phase. This does not replace the current access logs, but runs after.
Default value: undef
Data type: Optional[String]
Equivalent to log_by_lua, except that the file specified by contains the Lua code, or, as from the v0.5.0rc32 release, the Lua/LuaJIT bytecode to be executed.
Default value: undef
Data type: Optional[String]
Defines gzip_types, nginx default is text/html
Default value: undef
Data type: Optional[String]
Defines gzip_static, nginx default is off
Default value: undef
Data type: String
Defines owner of the .conf file
Default value: $nginx::global_owner
Data type: String
Defines group of the .conf file
Default value: $nginx::global_group
Data type: String
Defines mode of the .conf file
Default value: $nginx::global_mode
Data type: Boolean
A boolean value to set a server in maintenance
Default value: false
Data type: String
Value to return when maintenance is on.
Default value: 'return 503'
Data type: Any
Setup errors pages, hash key is the http code and hash value the page
Default value: undef
Data type: Hash
Hash of location resources used by this server
Default value: {}
Data type: Hash
Hash of location default settings
Default value: {}
Data type: Boolean
Default value: true
Data type: Optional[String]
Default value: undef
Data type: Any
Default value: $nginx::proxy_connect_timeout
Data type: Array[String]
Default value: $nginx::proxy_set_header
Data type: Array[String]
Default value: $nginx::proxy_hide_header
Data type: Array[String]
Default value: $nginx::proxy_pass_header
Data type: Optional[String]
Default value: undef
Data type: String
Default value: "${nginx::config::conf_dir}/uwsgi_params"
Data type: Optional[Hash]
Default value: undef
Data type: Optional[Hash]
Default value: undef
Data type: Optional[Hash]
Default value: undef
Data type: Optional[Hash]
Default value: undef
Data type: Optional[Hash]
Default value: undef
Data type: Any
Default value: 'combined'
Data type: Any
Default value: true
Data type: Any
Default value: []
Data type: Any
Default value: {}
Data type: Any
Default value: {}
Create a reusable config snippet that can be included by other resources
The following parameters are available in the nginx::resource::snippet
defined type:
Data type: Enum['absent', 'present']
Enables or disables the specified snippet
Default value: 'present'
Data type: String
Defines owner of the .conf file
Default value: $nginx::global_owner
Data type: String
Defines group of the .conf file
Default value: $nginx::global_group
Data type: Stdlib::Filemode
Defines mode of the .conf file
Default value: $nginx::global_mode
Data type: String[1]
Raw content that will be inserted into the snipped as-is
Create a virtual steamhost
nginx::resource::streamhost { 'test2.local':
ensure => present,
}
The following parameters are available in the nginx::resource::streamhost
defined type:
ensure
listen_ip
listen_port
listen_options
ipv6_enable
ipv6_listen_ip
ipv6_listen_port
ipv6_listen_options
proxy
proxy_read_timeout
resolver
raw_prepend
raw_append
owner
group
mode
proxy_connect_timeout
Data type: Enum['absent', 'present']
Enables or disables the specified streamhost
Default value: 'present'
Data type: Variant[Array, String]
Default IP Address for NGINX to listen with this streamhost on. Defaults to all interfaces (*)
Default value: '*'
Data type: Integer
Default TCP Port for NGINX to listen with this streamhost on.
Default value: 80
Data type: Optional[String]
Extra options for listen directive like 'default' to catchall.
Default value: undef
Data type: Boolean
Value to enable/disable IPv6 support Module will check to see if IPv6 support exists on your system before enabling.
Default value: false
Data type: Variant[Array, String]
Default IPv6 Address for NGINX to listen with this streamhost on. Defaults to all interfaces (::)
Default value: '::'
Data type: Integer
Default IPv6 Port for NGINX to listen with this streamhost on.
Default value: 80
Data type: String
Extra options for listen directive like 'default' to catchall. Template will allways add ipv6only=on. While issue voxpupuli#30 is discussed, default value is 'default'.
Default value: 'default ipv6only=on'
Data type: Any
Proxy server(s) for the root location to connect to. Accepts a single value, can be used in conjunction with nginx::resource::upstream
Default value: undef
Data type: String
Override the default the proxy read timeout value of 90 seconds
Default value: $nginx::proxy_read_timeout
Data type: Array
Configures name servers used to resolve names of upstream servers into addresses.
Default value: []
Data type: Variant[Array[String], String]
A single string, or an array of strings to prepend to the server directive (after cfg prepend directives). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: []
Data type: Variant[Array[String], String]
A single string, or an array of strings to append to the server directive (after cfg append directives). NOTE: YOU are responsible for a semicolon on each line that requires one.
Default value: []
Data type: String
Defines owner of the .conf file
Default value: $nginx::global_owner
Data type: String
Defines group of the .conf file
Default value: $nginx::global_group
Data type: String
Defines mode of the .conf file Default to return 503
Default value: $nginx::global_mode
Data type: Any
Default value: $nginx::proxy_connect_timeout
Create a new upstream proxy entry for NGINX
nginx::resource::upstream { 'proxypass':
ensure => present,
members => {
'localhost:3001' => {
server => 'localhost',
port => 3001,
},
'localhost:3002' => {
server => 'localhost',
port => 3002,
},
'localhost:3003' => {
server => 'localhost',
port => 3003,
},
},
}
Custom config example to use ip_hash, and 20 keepalive connections create a hash with any extra custom config you want.
nginx::resource::upstream { 'proxypass':
ensure => present,
members => {
'localhost:3001' => {
server => 'localhost',
port => 3001,
},
'localhost:3002' => {
server => 'localhost',
port => 3002,
},
'localhost:3003' => {
server => 'localhost',
port => 3003,
},
},
ip_hash => true,
keepalive => 20,
}
The following parameters are available in the nginx::resource::upstream
defined type:
ensure
context
members
members_tag
member_defaults
hash
ip_hash
keepalive
keepalive_requests
keepalive_timeout
least_conn
least_time
ntlm
queue_max
queue_timeout
random
statefile
sticky
zone
cfg_append
cfg_prepend
Data type: Enum['present', 'absent']
Enables or disables the specified location
Default value: 'present'
Data type: Enum['http', 'stream']
Set the type of this upstream.
Default value: 'http'
Data type: Nginx::UpstreamMembers
Hash of member URIs for NGINX to connect to. Must follow valid NGINX syntax. If omitted, individual members should be defined with nginx::resource::upstream::member
Default value: {}
Data type: Optional[String[1]]
Restrict collecting the exported members for this upstream with a tag.
Default value: undef
Data type: Nginx::UpstreamMemberDefaults
Specify default settings added to each member of this upstream.
Default value: {}
Data type: Optional[String[1]]
Activate the hash load balancing method (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#hash).
Default value: undef
Data type: Boolean
Activate ip_hash for this upstream (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#ip_hash).
Default value: false
Data type: Optional[Integer[1]]
Set the maximum number of idle keepalive connections (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive).
Default value: undef
Data type: Optional[Integer[1]]
Sets the maximum number of requests that can be served through one keepalive connection (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_requests).
Default value: undef
Data type: Optional[Nginx::Time]
Sets a timeout during which an idle keepalive connection to an upstream server will stay open (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_timeout).
Default value: undef
Data type: Boolean
Activate the least_conn load balancing method (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#least_conn).
Default value: false
Data type: Optional[Nginx::UpstreamLeastTime]
Activate the least_time load balancing method (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#least_time).
Default value: undef
Data type: Boolean
Allow NTLM authentication (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#ntlm).
Default value: false
Data type: Optional[Integer]
Set the maximum number of queued requests (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#queue).
Default value: undef
Data type: Optional[Nginx::Time]
Set the timeout for the queue (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#queue).
Default value: undef
Data type: Optional[String[1]]
Activate the random load balancing method (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#random).
Default value: undef
Data type: Optional[Stdlib::Unixpath]
Specifies a file that keeps the state of the dynamically configurable group (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#state).
Default value: undef
Data type: Optional[Nginx::UpstreamSticky]
Enables session affinity (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#sticky).
Default value: undef
Data type: Optional[Nginx::UpstreamZone]
Defines the name and optional the size of the shared memory zone (https://nginx.org/en/docs/http/ngx_http_upstream_module.html#zone).
Default value: undef
Data type: Nginx::UpstreamCustomParameters
Hash of custom directives to put after other directives in upstream
Default value: {}
Data type: Nginx::UpstreamCustomParameters
It expects a hash with custom directives to put before anything else inside upstream
Default value: {}
Export this resource in all upstream member servers and collect them on the NGINX server. Exporting resources requires storeconfigs on the Puppetserver to export and collect resources
@@nginx::resource::upstream::member { $trusted['certname']:
ensure => present,
upstream => 'proxypass',
server => $facts['networking']['ip'],
port => 3000,
}
nginx::resource::upstream { 'proxypass':
ensure => present,
}
The following parameters are available in the nginx::resource::upstream::member
defined type:
upstream
ensure
context
server
port
weight
max_conns
max_fails
fail_timeout
backup
resolve
route
service
slow_start
state
params_prepend
params_append
comment
Data type: String[1]
The name of the upstream resource
Data type: Enum['present', 'absent']
Enables or disables the specified member
Default value: 'present'
Data type: Enum['http', 'stream']
Set the type of this upstream
Default value: 'http'
Data type: Optional[Nginx::UpstreamMemberServer]
Hostname or IP of the upstream member server
Default value: $name
Data type: Stdlib::Port
Port of the listening service on the upstream member
Default value: 80
Data type: Optional[Integer[1]]
Set the weight for this upstream member
Default value: undef
Data type: Optional[Integer[1]]
Set the max_conns for this upstream member
Default value: undef
Data type: Optional[Integer[0]]
Set the max_fails for this upstream member
Default value: undef
Data type: Optional[Nginx::Time]
Set the fail_timeout for this upstream member
Default value: undef
Data type: Boolean
Activate backup for this upstream member
Default value: false
Data type: Boolean
Activate resolve for this upstream member
Default value: false
Data type: Optional[String[1]]
Set the route for this upstream member
Default value: undef
Data type: Optional[String[1]]
Set the service for this upstream member
Default value: undef
Data type: Optional[Nginx::Time]
Set the slow_start for this upstream member
Default value: undef
Data type: Optional[Enum['drain','down']]
Set the state for this upstream member
Default value: undef
Data type: Optional[String[1]]
prepend a parameter for this upstream member
Default value: undef
Data type: Optional[String[1]]
append a paremeter for this upstream member
Default value: undef
Data type: Optional[String[1]]
Add a comment for this upstream member
Default value: undef
The Nginx::DebugConnection data type.
Alias of
Variant[Stdlib::Host, Stdlib::IP::Address, Enum['unix:']]
The Nginx::ErrorLogSeverity data type.
Alias of
Enum['debug', 'info', 'notice', 'warn', 'error', 'crit', 'alert', 'emerg']
The Nginx::Size data type.
Alias of
Pattern[/^\d+[k|K|m|M]?$/]
The Nginx::Time data type.
Alias of
Pattern[/^\d+(ms|s|m|h|d|w|M|y)?$/]
The Nginx::UpstreamCustomParameters data type.
Alias of
Hash[String[1], Variant[
String[1],
Integer,
Array[
Variant[
String[1],
Integer
]
],
Hash[String[1],
Variant[
String[1],
Integer,
Array[
Variant[
String[1],
Integer,
]
]
]
]
]]
The Nginx::UpstreamDefaults data type.
Alias of
Struct[{
context => Optional[Enum['http', 'stream']],
member_defaults => Optional[Nginx::UpstreamMemberDefaults],
hash => Optional[String],
ip_hash => Optional[Boolean],
keepalive => Optional[Integer[1]],
kepalive_requests => Optional[Integer[1]],
keepalive_timeout => Optional[Nginx::Time],
least_conn => Optional[Boolean],
least_time => Optional[Nginx::UpstreamLeastTime],
ntlm => Optional[Boolean],
queue_max => Optional[Integer],
queue_timeout => Optional[Nginx::Time],
random => Optional[String],
statefile => Optional[Stdlib::Unixpath],
sticky => Optional[Nginx::UpstreamSticky],
zone => Optional[Nginx::UpstreamZone],
cfg_append => Optional[Hash],
cfg_prepend => Optional[Hash],
}]
The Nginx::UpstreamLeastTime data type.
Alias of
Variant[Nginx::UpstreamLeastTimeHttp, Nginx::UpstreamLeastTimeStream]
The Nginx::UpstreamLeastTimeHttp data type.
Alias of
Enum['header', 'header inflight', 'last_byte', 'last_byte inflight']
The Nginx::UpstreamLeastTimeStream data type.
Alias of
Enum['connect', 'connect inflight', 'first_byte', 'first_byte inflight', 'last_byte', 'last_byte inflight']
The Nginx::UpstreamMember data type.
Alias of
Struct[{
server => Optional[Nginx::UpstreamMemberServer],
port => Optional[Stdlib::Port],
weight => Optional[Integer[1]],
max_conns => Optional[Integer[1]],
max_fails => Optional[Integer[0]],
fail_timeout => Optional[Nginx::Time],
backup => Optional[Boolean],
resolve => Optional[Boolean],
route => Optional[String],
service => Optional[String],
slow_start => Optional[Nginx::Time],
state => Optional[Enum['drain','down']],
params_prepend => Optional[String],
params_append => Optional[String],
comment => Optional[String],
}]
The Nginx::UpstreamMemberDefaults data type.
Alias of
Struct[{
server => Optional[Nginx::UpstreamMemberServer],
port => Optional[Stdlib::Port],
weight => Optional[Integer[1]],
max_conns => Optional[Integer[1]],
max_fails => Optional[Integer[0]],
fail_timeout => Optional[Nginx::Time],
backup => Optional[Boolean],
resolve => Optional[Boolean],
route => Optional[String],
service => Optional[String],
slow_start => Optional[Nginx::Time],
state => Optional[Enum['drain','down']],
params_prepend => Optional[String],
params_append => Optional[String],
}]
The Nginx::UpstreamMemberServer data type.
Alias of
Variant[Stdlib::Host, Pattern[/^unix:\/([^\/\0]+\/*)[^:]*$/]]
The Nginx::UpstreamMembers data type.
Alias of
Hash[String, Nginx::UpstreamMember]
The Nginx::UpstreamSticky data type.
Alias of
Variant[Hash[
Enum['cookie'],
Struct[{
name => String,
expires => Optional[Variant[Nginx::Time,Enum['max']]],
domain => Optional[String],
httponly => Optional[Boolean],
secure => Optional[Boolean],
path => Optional[String],
}]
], Hash[
Enum['route'],
String
], Hash[
Enum['learn'],
Struct[{
create => String,
lookup => String,
zone => Nginx::UpstreamStickyZone,
timeout => Optional[Nginx::Time],
header => Optional[Boolean],
sync => Optional[Boolean],
}]
]]
The Nginx::UpstreamStickyZone data type.
Alias of
Pattern[/^[-_\.A-Za-z0-9]*:\d+[k|K|m|M]$/]
The Nginx::UpstreamZone data type.
Alias of
Pattern[/^[-_\.A-Za-z0-9]* \d+[k|K|m|M]$/]