Skip to content

Commit

Permalink
Merge pull request voxpupuli#1213 from bastelfreak/scoping
Browse files Browse the repository at this point in the history
migrate vars from topscope to relative scope
  • Loading branch information
bastelfreak authored May 11, 2018
2 parents 9e270ca + 206dc3d commit a96953b
Show file tree
Hide file tree
Showing 14 changed files with 220 additions and 220 deletions.
204 changes: 102 additions & 102 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,106 +17,106 @@

assert_private()

$client_body_temp_path = $::nginx::client_body_temp_path
$confd_only = $::nginx::confd_only
$confd_purge = $::nginx::confd_purge
$conf_dir = $::nginx::conf_dir
$daemon = $::nginx::daemon
$daemon_user = $::nginx::daemon_user
$daemon_group = $::nginx::daemon_group
$global_owner = $::nginx::global_owner
$global_group = $::nginx::global_group
$global_mode = $::nginx::global_mode
$log_dir = $::nginx::log_dir
$log_group = $::nginx::log_group
$log_mode = $::nginx::log_mode
$http_access_log = $::nginx::http_access_log
$http_format_log = $::nginx::http_format_log
$nginx_error_log = $::nginx::nginx_error_log
$nginx_error_log_severity = $::nginx::nginx_error_log_severity
$pid = $::nginx::pid
$proxy_temp_path = $::nginx::proxy_temp_path
$root_group = $::nginx::root_group
$run_dir = $::nginx::run_dir
$sites_available_owner = $::nginx::sites_available_owner
$sites_available_group = $::nginx::sites_available_group
$sites_available_mode = $::nginx::sites_available_mode
$super_user = $::nginx::super_user
$temp_dir = $::nginx::temp_dir
$server_purge = $::nginx::server_purge
$accept_mutex = $::nginx::accept_mutex
$accept_mutex_delay = $::nginx::accept_mutex_delay
$client_body_buffer_size = $::nginx::client_body_buffer_size
$client_max_body_size = $::nginx::client_max_body_size
$client_body_timeout = $::nginx::client_body_timeout
$send_timeout = $::nginx::send_timeout
$lingering_timeout = $::nginx::lingering_timeout
$etag = $::nginx::etag
$events_use = $::nginx::events_use
$fastcgi_cache_inactive = $::nginx::fastcgi_cache_inactive
$fastcgi_cache_key = $::nginx::fastcgi_cache_key
$fastcgi_cache_keys_zone = $::nginx::fastcgi_cache_keys_zone
$fastcgi_cache_levels = $::nginx::fastcgi_cache_levels
$fastcgi_cache_max_size = $::nginx::fastcgi_cache_max_size
$fastcgi_cache_path = $::nginx::fastcgi_cache_path
$fastcgi_cache_use_stale = $::nginx::fastcgi_cache_use_stale
$gzip = $::nginx::gzip
$gzip_buffers = $::nginx::gzip_buffers
$gzip_comp_level = $::nginx::gzip_comp_level
$gzip_disable = $::nginx::gzip_disable
$gzip_min_length = $::nginx::gzip_min_length
$gzip_http_version = $::nginx::gzip_http_version
$gzip_proxied = $::nginx::gzip_proxied
$gzip_types = $::nginx::gzip_types
$gzip_vary = $::nginx::gzip_vary
$http_raw_prepend = $::nginx::http_raw_prepend
$http_raw_append = $::nginx::http_raw_append
$http_cfg_prepend = $::nginx::http_cfg_prepend
$http_cfg_append = $::nginx::http_cfg_append
$http_tcp_nodelay = $::nginx::http_tcp_nodelay
$http_tcp_nopush = $::nginx::http_tcp_nopush
$keepalive_timeout = $::nginx::keepalive_timeout
$keepalive_requests = $::nginx::keepalive_requests
$log_format = $::nginx::log_format
$mail = $::nginx::mail
$stream = $::nginx::stream
$multi_accept = $::nginx::multi_accept
$names_hash_bucket_size = $::nginx::names_hash_bucket_size
$names_hash_max_size = $::nginx::names_hash_max_size
$nginx_cfg_prepend = $::nginx::nginx_cfg_prepend
$proxy_buffers = $::nginx::proxy_buffers
$proxy_buffer_size = $::nginx::proxy_buffer_size
$proxy_cache_inactive = $::nginx::proxy_cache_inactive
$proxy_cache_keys_zone = $::nginx::proxy_cache_keys_zone
$proxy_cache_levels = $::nginx::proxy_cache_levels
$proxy_cache_max_size = $::nginx::proxy_cache_max_size
$proxy_cache_path = $::nginx::proxy_cache_path
$proxy_cache_loader_files = $::nginx::proxy_cache_loader_files
$proxy_cache_loader_sleep = $::nginx::proxy_cache_loader_sleep
$proxy_cache_loader_threshold = $::nginx::proxy_cache_loader_threshold
$proxy_use_temp_path = $::nginx::proxy_use_temp_path
$proxy_connect_timeout = $::nginx::proxy_connect_timeout
$proxy_headers_hash_bucket_size = $::nginx::proxy_headers_hash_bucket_size
$proxy_http_version = $::nginx::proxy_http_version
$proxy_read_timeout = $::nginx::proxy_read_timeout
$proxy_redirect = $::nginx::proxy_redirect
$proxy_send_timeout = $::nginx::proxy_send_timeout
$proxy_set_header = $::nginx::proxy_set_header
$proxy_hide_header = $::nginx::proxy_hide_header
$proxy_pass_header = $::nginx::proxy_pass_header
$sendfile = $::nginx::sendfile
$server_tokens = $::nginx::server_tokens
$spdy = $::nginx::spdy
$http2 = $::nginx::http2
$ssl_stapling = $::nginx::ssl_stapling
$types_hash_bucket_size = $::nginx::types_hash_bucket_size
$types_hash_max_size = $::nginx::types_hash_max_size
$worker_connections = $::nginx::worker_connections
$worker_processes = $::nginx::worker_processes
$worker_rlimit_nofile = $::nginx::worker_rlimit_nofile
$ssl_prefer_server_ciphers = $::nginx::ssl_prefer_server_ciphers
$ssl_protocols = $::nginx::ssl_protocols
$ssl_ciphers = $::nginx::ssl_ciphers
$client_body_temp_path = $nginx::client_body_temp_path
$confd_only = $nginx::confd_only
$confd_purge = $nginx::confd_purge
$conf_dir = $nginx::conf_dir
$daemon = $nginx::daemon
$daemon_user = $nginx::daemon_user
$daemon_group = $nginx::daemon_group
$global_owner = $nginx::global_owner
$global_group = $nginx::global_group
$global_mode = $nginx::global_mode
$log_dir = $nginx::log_dir
$log_group = $nginx::log_group
$log_mode = $nginx::log_mode
$http_access_log = $nginx::http_access_log
$http_format_log = $nginx::http_format_log
$nginx_error_log = $nginx::nginx_error_log
$nginx_error_log_severity = $nginx::nginx_error_log_severity
$pid = $nginx::pid
$proxy_temp_path = $nginx::proxy_temp_path
$root_group = $nginx::root_group
$run_dir = $nginx::run_dir
$sites_available_owner = $nginx::sites_available_owner
$sites_available_group = $nginx::sites_available_group
$sites_available_mode = $nginx::sites_available_mode
$super_user = $nginx::super_user
$temp_dir = $nginx::temp_dir
$server_purge = $nginx::server_purge
$accept_mutex = $nginx::accept_mutex
$accept_mutex_delay = $nginx::accept_mutex_delay
$client_body_buffer_size = $nginx::client_body_buffer_size
$client_max_body_size = $nginx::client_max_body_size
$client_body_timeout = $nginx::client_body_timeout
$send_timeout = $nginx::send_timeout
$lingering_timeout = $nginx::lingering_timeout
$etag = $nginx::etag
$events_use = $nginx::events_use
$fastcgi_cache_inactive = $nginx::fastcgi_cache_inactive
$fastcgi_cache_key = $nginx::fastcgi_cache_key
$fastcgi_cache_keys_zone = $nginx::fastcgi_cache_keys_zone
$fastcgi_cache_levels = $nginx::fastcgi_cache_levels
$fastcgi_cache_max_size = $nginx::fastcgi_cache_max_size
$fastcgi_cache_path = $nginx::fastcgi_cache_path
$fastcgi_cache_use_stale = $nginx::fastcgi_cache_use_stale
$gzip = $nginx::gzip
$gzip_buffers = $nginx::gzip_buffers
$gzip_comp_level = $nginx::gzip_comp_level
$gzip_disable = $nginx::gzip_disable
$gzip_min_length = $nginx::gzip_min_length
$gzip_http_version = $nginx::gzip_http_version
$gzip_proxied = $nginx::gzip_proxied
$gzip_types = $nginx::gzip_types
$gzip_vary = $nginx::gzip_vary
$http_raw_prepend = $nginx::http_raw_prepend
$http_raw_append = $nginx::http_raw_append
$http_cfg_prepend = $nginx::http_cfg_prepend
$http_cfg_append = $nginx::http_cfg_append
$http_tcp_nodelay = $nginx::http_tcp_nodelay
$http_tcp_nopush = $nginx::http_tcp_nopush
$keepalive_timeout = $nginx::keepalive_timeout
$keepalive_requests = $nginx::keepalive_requests
$log_format = $nginx::log_format
$mail = $nginx::mail
$stream = $nginx::stream
$multi_accept = $nginx::multi_accept
$names_hash_bucket_size = $nginx::names_hash_bucket_size
$names_hash_max_size = $nginx::names_hash_max_size
$nginx_cfg_prepend = $nginx::nginx_cfg_prepend
$proxy_buffers = $nginx::proxy_buffers
$proxy_buffer_size = $nginx::proxy_buffer_size
$proxy_cache_inactive = $nginx::proxy_cache_inactive
$proxy_cache_keys_zone = $nginx::proxy_cache_keys_zone
$proxy_cache_levels = $nginx::proxy_cache_levels
$proxy_cache_max_size = $nginx::proxy_cache_max_size
$proxy_cache_path = $nginx::proxy_cache_path
$proxy_cache_loader_files = $nginx::proxy_cache_loader_files
$proxy_cache_loader_sleep = $nginx::proxy_cache_loader_sleep
$proxy_cache_loader_threshold = $nginx::proxy_cache_loader_threshold
$proxy_use_temp_path = $nginx::proxy_use_temp_path
$proxy_connect_timeout = $nginx::proxy_connect_timeout
$proxy_headers_hash_bucket_size = $nginx::proxy_headers_hash_bucket_size
$proxy_http_version = $nginx::proxy_http_version
$proxy_read_timeout = $nginx::proxy_read_timeout
$proxy_redirect = $nginx::proxy_redirect
$proxy_send_timeout = $nginx::proxy_send_timeout
$proxy_set_header = $nginx::proxy_set_header
$proxy_hide_header = $nginx::proxy_hide_header
$proxy_pass_header = $nginx::proxy_pass_header
$sendfile = $nginx::sendfile
$server_tokens = $nginx::server_tokens
$spdy = $nginx::spdy
$http2 = $nginx::http2
$ssl_stapling = $nginx::ssl_stapling
$types_hash_bucket_size = $nginx::types_hash_bucket_size
$types_hash_max_size = $nginx::types_hash_max_size
$worker_connections = $nginx::worker_connections
$worker_processes = $nginx::worker_processes
$worker_rlimit_nofile = $nginx::worker_rlimit_nofile
$ssl_prefer_server_ciphers = $nginx::ssl_prefer_server_ciphers
$ssl_protocols = $nginx::ssl_protocols
$ssl_ciphers = $nginx::ssl_ciphers

# Non-configurable settings
$conf_template = 'nginx/conf.d/nginx.conf.erb'
Expand Down Expand Up @@ -147,12 +147,12 @@
File["${conf_dir}/conf.d"] {
purge => true,
recurse => true,
notify => Class['::nginx::service'],
notify => Class['nginx::service'],
}
File["${conf_dir}/conf.stream.d"] {
purge => true,
recurse => true,
notify => Class['::nginx::service'],
notify => Class['nginx::service'],
}
}
}
Expand Down
50 changes: 25 additions & 25 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@
# }
class nginx (
### START Nginx Configuration ###
$client_body_temp_path = $::nginx::params::client_body_temp_path,
$client_body_temp_path = $nginx::params::client_body_temp_path,
Boolean $confd_only = false,
Boolean $confd_purge = false,
$conf_dir = $::nginx::params::conf_dir,
$conf_dir = $nginx::params::conf_dir,
Optional[Enum['on', 'off']] $daemon = undef,
$daemon_user = $::nginx::params::daemon_user,
$daemon_user = $nginx::params::daemon_user,
$daemon_group = undef,
$global_owner = $::nginx::params::global_owner,
$global_group = $::nginx::params::global_group,
$global_mode = $::nginx::params::global_mode,
$log_dir = $::nginx::params::log_dir,
$log_group = $::nginx::params::log_group,
$global_owner = $nginx::params::global_owner,
$global_group = $nginx::params::global_group,
$global_mode = $nginx::params::global_mode,
$log_dir = $nginx::params::log_dir,
$log_group = $nginx::params::log_group,
$log_mode = '0750',
Variant[String, Array[String]] $http_access_log = "${log_dir}/${::nginx::params::http_access_log_file}",
$http_format_log = undef,
Variant[String, Array[String]] $nginx_error_log = "${log_dir}/${::nginx::params::nginx_error_log_file}",
Nginx::ErrorLogSeverity $nginx_error_log_severity = 'error',
$pid = $::nginx::params::pid,
$proxy_temp_path = $::nginx::params::proxy_temp_path,
$root_group = $::nginx::params::root_group,
$run_dir = $::nginx::params::run_dir,
$sites_available_owner = $::nginx::params::sites_available_owner,
$sites_available_group = $::nginx::params::sites_available_group,
$sites_available_mode = $::nginx::params::sites_available_mode,
Boolean $super_user = $::nginx::params::super_user,
$temp_dir = $::nginx::params::temp_dir,
$pid = $nginx::params::pid,
$proxy_temp_path = $nginx::params::proxy_temp_path,
$root_group = $nginx::params::root_group,
$run_dir = $nginx::params::run_dir,
$sites_available_owner = $nginx::params::sites_available_owner,
$sites_available_group = $nginx::params::sites_available_group,
$sites_available_mode = $nginx::params::sites_available_mode,
Boolean $super_user = $nginx::params::super_user,
$temp_dir = $nginx::params::temp_dir,
Boolean $server_purge = false,

# Primary Templates
Expand Down Expand Up @@ -141,10 +141,10 @@

### START Package Configuration ###
$package_ensure = present,
$package_name = $::nginx::params::package_name,
$package_name = $nginx::params::package_name,
$package_source = 'nginx',
$package_flavor = undef,
$manage_repo = $::nginx::params::manage_repo,
$manage_repo = $nginx::params::manage_repo,
Optional[String] $repo_release = undef,
$passenger_package_ensure = 'present',
### END Package Configuration ###
Expand All @@ -169,11 +169,11 @@
$nginx_servers = {},
$nginx_servers_defaults = {},
### END Hiera Lookups ###
) inherits ::nginx::params {
) inherits nginx::params {

contain '::nginx::package'
contain '::nginx::config'
contain '::nginx::service'
contain 'nginx::package'
contain 'nginx::config'
contain 'nginx::service'

create_resources('nginx::resource::upstream', $nginx_upstreams)
create_resources('nginx::resource::server', $nginx_servers, $nginx_servers_defaults)
Expand All @@ -186,6 +186,6 @@
# 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.
Class['::nginx::package'] -> Class['::nginx::config'] ~> Class['::nginx::service']
Class['::nginx::package'] ~> Class['::nginx::service']
Class['nginx::package'] -> Class['nginx::config'] ~> Class['nginx::service']
Class['nginx::package'] ~> Class['nginx::service']
}
16 changes: 8 additions & 8 deletions manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
# This class file is not called directly
class nginx::package {

$package_name = $::nginx::package_name
$package_source = $::nginx::package_source
$package_ensure = $::nginx::package_ensure
$package_flavor = $::nginx::package_flavor
$passenger_package_ensure = $::nginx::passenger_package_ensure
$manage_repo = $::nginx::manage_repo
$package_name = $nginx::package_name
$package_source = $nginx::package_source
$package_ensure = $nginx::package_ensure
$package_flavor = $nginx::package_flavor
$passenger_package_ensure = $nginx::passenger_package_ensure
$manage_repo = $nginx::manage_repo

assert_private()

case $facts['os']['family'] {
'redhat': {
contain ::nginx::package::redhat
contain nginx::package::redhat
}
'debian': {
contain ::nginx::package::debian
contain nginx::package::debian
}
'Solaris': {
# $package_name needs to be specified. SFEnginx,CSWnginx depending on
Expand Down
Loading

0 comments on commit a96953b

Please sign in to comment.