Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8395611
init.pp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Subscribers
None
init.pp
View Options
# Class: nginx
#
# This module manages NGINX.
#
# Parameters:
#
# There are no default parameters for this class. All module parameters
# are managed via puppet-module-data (see data/ dir)
#
# Actions:
#
# Requires:
# puppetlabs-stdlib - https://github.com/puppetlabs/puppetlabs-stdlib
#
# Packaged NGINX
# - RHEL: EPEL or custom package
# - Debian/Ubuntu: Default Install or custom package
# - SuSE: Default Install or custom package
#
# stdlib
# - puppetlabs-stdlib module >= 0.1.6
# - plugin sync enabled to obtain the anchor type
#
# Sample Usage:
#
# The module works with sensible defaults:
#
# node default {
# include nginx
# }
class
nginx
(
$client_body_buffer_size
=
undef
,
$client_body_temp_path
=
undef
,
$client_max_body_size
=
undef
,
$confd_purge
=
undef
,
$configtest_enable
=
undef
,
$conf_dir
=
undef
,
$conf_template
=
undef
,
$daemon_user
=
undef
,
$events_use
=
undef
,
$fastcgi_cache_inactive
=
undef
,
$fastcgi_cache_key
=
undef
,
$fastcgi_cache_keys_zone
=
undef
,
$fastcgi_cache_levels
=
undef
,
$fastcgi_cache_max_size
=
undef
,
$fastcgi_cache_path
=
undef
,
$fastcgi_cache_use_stale
=
undef
,
$gzip
=
undef
,
$http_access_log
=
undef
,
$http_cfg_append
=
undef
,
$http_tcp_nodelay
=
undef
,
$http_tcp_nopush
=
undef
,
$keepalive_timeout
=
undef
,
$logdir
=
undef
,
$mail
=
undef
,
$manage_repo
=
undef
,
$multi_accept
=
undef
,
$names_hash_bucket_size
=
undef
,
$names_hash_max_size
=
undef
,
$nginx_error_log
=
undef
,
$nginx_locations
=
{},
$nginx_mailhosts
=
{},
$nginx_upstreams
=
{},
$nginx_vhosts
=
{},
$nginx_vhosts_defaults
=
{},
$package_ensure
=
undef
,
$package_name
=
undef
,
$package_source
=
undef
,
$pid
=
undef
,
$proxy_buffers
=
undef
,
$proxy_buffer_size
=
undef
,
$proxy_cache_inactive
=
undef
,
$proxy_cache_keys_zone
=
undef
,
$proxy_cache_levels
=
undef
,
$proxy_cache_max_size
=
undef
,
$proxy_cache_path
=
undef
,
$proxy_conf_template
=
undef
,
$proxy_connect_timeout
=
undef
,
$proxy_headers_hash_bucket_size
=
undef
,
$proxy_http_version
=
undef
,
$proxy_read_timeout
=
undef
,
$proxy_redirect
=
undef
,
$proxy_send_timeout
=
undef
,
$proxy_set_header
=
undef
,
$proxy_temp_path
=
undef
,
$run_dir
=
undef
,
$sendfile
=
undef
,
$server_tokens
=
undef
,
$service_ensure
=
undef
,
$service_restart
=
undef
,
$spdy
=
undef
,
$super_user
=
undef
,
$temp_dir
=
undef
,
$types_hash_bucket_size
=
undef
,
$types_hash_max_size
=
undef
,
$vhost_purge
=
undef
,
$worker_connections
=
undef
,
$worker_processes
=
undef
,
$worker_rlimit_nofile
=
undef
,
$global_owner
=
undef
,
$global_group
=
undef
,
$global_mode
=
undef
,
$sites_available_owner
=
undef
,
$sites_available_group
=
undef
,
$sites_available_mode
=
undef
,
$geo_mappings
=
{},
$string_mappings
=
{},
)
{
### DEPRECATION WARNING ###
###
### During the transition from the params pattern -> puppet-module-data,
### we need a graceful way to notify the consumer that the pattern is
### changing, and point them toward docs on how to transition.
###
### Once we hit 1.0, this whole block goes away.
###
### Please note: as a contributor to this module, no Pulls will be accepted
### that do add additional parameters to this class. Get on this puppet-module-data
### level!
### This block makes me sad, but what can you do.... we need to do this
### migration the Right Way(tm) -- JDF
if
$client_body_buffer_size
or
$client_body_temp_path
or
$client_max_body_size
or
$confd_purge
or
$conf_dir
or
$conf_template
or
$daemon_user
or
$events_use
or
$fastcgi_cache_inactive
or
$fastcgi_cache_key
or
$fastcgi_cache_keys_zone
or
$fastcgi_cache_levels
or
$fastcgi_cache_max_size
or
$fastcgi_cache_path
or
$fastcgi_cache_use_stale
or
$gzip
or
$http_access_log
or
$http_cfg_append
or
$http_tcp_nodelay
or
$http_tcp_nopush
or
$keepalive_timeout
or
$logdir
or
$mail
or
$multi_accept
or
$names_hash_bucket_size
or
$names_hash_max_size
or
$nginx_error_log
or
$pid
or
$proxy_buffers
or
$proxy_buffer_size
or
$proxy_cache_inactive
or
$proxy_cache_keys_zone
or
$proxy_cache_levels
or
$proxy_cache_max_size
or
$proxy_cache_path
or
$proxy_conf_template
or
$proxy_connect_timeout
or
$proxy_headers_hash_bucket_size
or
$proxy_http_version
or
$proxy_read_timeout
or
$proxy_redirect
or
$proxy_send_timeout
or
$proxy_set_header
or
$proxy_temp_path
or
$run_dir
or
$sendfile
or
$server_tokens
or
$spdy
or
$super_user
or
$temp_dir
or
$types_hash_bucket_size
or
$types_hash_max_size
or
$vhost_purge
or
$worker_connections
or
$worker_processes
or
$worker_rlimit_nofile
or
$global_owner
or
$global_group
or
$global_mode
or
$sites_available_owner
or
$sites_available_group
or
$sites_available_mode
{
include
nginx
::
notice
::
puppet_module_data
}
### END DEPRECATION WARNING ###
class
{
'nginx::package'
:
package_name
=>
$package_name,
package_source
=>
$package_source,
package_ensure
=>
$package_ensure,
notify
=>
Class
[
'nginx::service'
],
manage_repo
=>
$manage_repo,
}
class
{
'nginx::config'
:
client_body_buffer_size
=>
$client_body_buffer_size,
client_body_temp_path
=>
$client_body_temp_path,
client_max_body_size
=>
$client_max_body_size,
confd_purge
=>
$confd_purge,
conf_dir
=>
$conf_dir,
conf_template
=>
$conf_template,
daemon_user
=>
$daemon_user,
events_use
=>
$events_use,
fastcgi_cache_inactive
=>
$fastcgi_cache_inactive,
fastcgi_cache_key
=>
$fastcgi_cache_key,
fastcgi_cache_keys_zone
=>
$fastcgi_cache_keys_zone,
fastcgi_cache_levels
=>
$fastcgi_cache_levels,
fastcgi_cache_max_size
=>
$fastcgi_cache_max_size,
fastcgi_cache_path
=>
$fastcgi_cache_path,
fastcgi_cache_use_stale
=>
$fastcgi_cache_use_stale,
gzip
=>
$gzip,
http_access_log
=>
$http_access_log,
http_cfg_append
=>
$http_cfg_append,
http_tcp_nodelay
=>
$http_tcp_nodelay,
http_tcp_nopush
=>
$http_tcp_nopush,
keepalive_timeout
=>
$keepalive_timeout,
logdir
=>
$logdir,
mail
=>
$mail,
multi_accept
=>
$multi_accept,
names_hash_bucket_size
=>
$names_hash_bucket_size,
names_hash_max_size
=>
$names_hash_max_size,
nginx_error_log
=>
$nginx_error_log,
pid
=>
$pid,
proxy_buffers
=>
$proxy_buffers,
proxy_buffer_size
=>
$proxy_buffer_size,
proxy_cache_inactive
=>
$proxy_cache_inactive,
proxy_cache_keys_zone
=>
$proxy_cache_keys_zone,
proxy_cache_levels
=>
$proxy_cache_levels,
proxy_cache_max_size
=>
$proxy_cache_max_size,
proxy_cache_path
=>
$proxy_cache_path,
proxy_conf_template
=>
$proxy_conf_template,
proxy_connect_timeout
=>
$proxy_connect_timeout,
proxy_headers_hash_bucket_size
=>
$proxy_headers_hash_bucket_size,
proxy_http_version
=>
$proxy_http_version,
proxy_read_timeout
=>
$proxy_read_timeout,
proxy_redirect
=>
$proxy_redirect,
proxy_send_timeout
=>
$proxy_send_timeout,
proxy_set_header
=>
$proxy_set_header,
proxy_temp_path
=>
$proxy_temp_path,
run_dir
=>
$run_dir,
sendfile
=>
$sendfile,
server_tokens
=>
$server_tokens,
spdy
=>
$spdy,
super_user
=>
$super_user,
temp_dir
=>
$temp_dir,
types_hash_bucket_size
=>
$types_hash_bucket_size,
types_hash_max_size
=>
$types_hash_max_size,
vhost_purge
=>
$vhost_purge,
worker_connections
=>
$worker_connections,
worker_processes
=>
$worker_processes,
worker_rlimit_nofile
=>
$worker_rlimit_nofile,
global_owner
=>
$global_owner,
global_group
=>
$global_group,
global_mode
=>
$global_mode,
sites_available_owner
=>
$sites_available_owner,
sites_available_group
=>
$sites_available_group,
sites_available_mode
=>
$sites_available_mode,
require
=>
Class
[
'nginx::package'
],
notify
=>
Class
[
'nginx::service'
],
}
class
{
'nginx::service'
:
}
create_resources
(
'nginx::resource::upstream'
,
$nginx_upstreams)
create_resources
(
'nginx::resource::vhost'
,
$nginx_vhosts,
$nginx_vhosts_defaults)
create_resources
(
'nginx::resource::location'
,
$nginx_locations)
create_resources
(
'nginx::resource::mailhost'
,
$nginx_mailhosts)
create_resources
(
'nginx::resource::map'
,
$string_mappings)
create_resources
(
'nginx::resource::geo'
,
$geo_mappings)
# Allow the end user to establish relationships to the "main" class
# and preserve the relationship to the implementation classes through
# a transitive relationship to the composite class.
anchor
{
'nginx::begin'
:
before
=>
Class
[
'nginx::package'
],
notify
=>
Class
[
'nginx::service'
],
}
anchor
{
'nginx::end'
:
require
=>
Class
[
'nginx::service'
],
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 7:42 PM (11 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3399329
Attached To
rSPNGX Puppet NGINX management module
Event Timeline
Log In to Comment