Skip to content

Commit

Permalink
enforce correct values for LimitNOFILE
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Sep 3, 2018
1 parent cb8ecaa commit b955458
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 93 deletions.
184 changes: 92 additions & 92 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -188,98 +188,98 @@
# @param $archive_options. default defined in param.pp. Extra options to Archive resource to download rabbitmqadmin file
# @param $loopback_users. default defined in param.pp. This option configures a list of users to allow access via the loopback interfaces
class rabbitmq(
Boolean $admin_enable = $rabbitmq::params::admin_enable,
Enum['ram', 'disk', 'disc'] $cluster_node_type = $rabbitmq::params::cluster_node_type,
Array $cluster_nodes = $rabbitmq::params::cluster_nodes,
String $config = $rabbitmq::params::config,
Boolean $config_cluster = $rabbitmq::params::config_cluster,
Stdlib::Absolutepath $config_path = $rabbitmq::params::config_path,
Boolean $config_ranch = $rabbitmq::params::config_ranch,
Boolean $config_stomp = $rabbitmq::params::config_stomp,
Boolean $config_shovel = $rabbitmq::params::config_shovel,
Hash $config_shovel_statics = $rabbitmq::params::config_shovel_statics,
String $default_user = $rabbitmq::params::default_user,
String $default_pass = $rabbitmq::params::default_pass,
Boolean $delete_guest_user = $rabbitmq::params::delete_guest_user,
String $env_config = $rabbitmq::params::env_config,
Stdlib::Absolutepath $env_config_path = $rabbitmq::params::env_config_path,
Optional[String] $erlang_cookie = undef,
Optional[String] $interface = undef,
Optional[String] $management_ip_address = undef,
Integer[1, 65535] $management_port = $rabbitmq::params::management_port,
Boolean $management_ssl = $rabbitmq::params::management_ssl,
Optional[String] $management_hostname = undef,
Optional[String] $node_ip_address = undef,
Optional[Variant[Numeric, String]] $package_apt_pin = undef,
String $package_ensure = $rabbitmq::params::package_ensure,
Optional[String] $package_gpg_key = $rabbitmq::params::package_gpg_key,
Variant[String, Array] $package_name = $rabbitmq::params::package_name,
Optional[String] $package_source = undef,
Optional[String] $package_provider = undef,
Boolean $repos_ensure = $rabbitmq::params::repos_ensure,
Boolean $manage_python = $rabbitmq::params::manage_python,
String $rabbitmq_user = $rabbitmq::params::rabbitmq_user,
String $rabbitmq_group = $rabbitmq::params::rabbitmq_group,
Stdlib::Absolutepath $rabbitmq_home = $rabbitmq::params::rabbitmq_home,
Integer $port = $rabbitmq::params::port,
Boolean $tcp_keepalive = $rabbitmq::params::tcp_keepalive,
Integer $tcp_backlog = $rabbitmq::params::tcp_backlog,
Optional[Integer] $tcp_sndbuf = undef,
Optional[Integer] $tcp_recbuf = undef,
Optional[Integer] $heartbeat = undef,
Enum['running', 'stopped'] $service_ensure = $rabbitmq::params::service_ensure,
Boolean $service_manage = $rabbitmq::params::service_manage,
String $service_name = $rabbitmq::params::service_name,
Boolean $ssl = $rabbitmq::params::ssl,
Boolean $ssl_only = $rabbitmq::params::ssl_only,
Optional[Stdlib::Absolutepath] $ssl_cacert = undef,
Optional[Stdlib::Absolutepath] $ssl_cert = undef,
Optional[Stdlib::Absolutepath] $ssl_key = undef,
Optional[Integer] $ssl_depth = undef,
Optional[String] $ssl_cert_password = undef,
Integer[1, 65535] $ssl_port = $rabbitmq::params::ssl_port,
Optional[String] $ssl_interface = undef,
Integer[1, 65535] $ssl_management_port = $rabbitmq::params::ssl_management_port,
Integer[1, 65535] $ssl_stomp_port = $rabbitmq::params::ssl_stomp_port,
Enum['verify_none','verify_peer'] $ssl_verify = $rabbitmq::params::ssl_verify,
Boolean $ssl_fail_if_no_peer_cert = $rabbitmq::params::ssl_fail_if_no_peer_cert,
Enum['verify_none','verify_peer'] $ssl_management_verify = $rabbitmq::params::ssl_management_verify,
Boolean $ssl_management_fail_if_no_peer_cert = $rabbitmq::params::ssl_management_fail_if_no_peer_cert,
Optional[Array] $ssl_versions = undef,
Boolean $ssl_secure_renegotiate = $rabbitmq::params::ssl_secure_renegotiate,
Boolean $ssl_reuse_sessions = $rabbitmq::params::ssl_reuse_sessions,
Boolean $ssl_honor_cipher_order = $rabbitmq::params::ssl_honor_cipher_order,
Optional[Stdlib::Absolutepath] $ssl_dhfile = undef,
Array $ssl_ciphers = $rabbitmq::params::ssl_ciphers,
Boolean $stomp_ensure = $rabbitmq::params::stomp_ensure,
Boolean $ldap_auth = $rabbitmq::params::ldap_auth,
String $ldap_server = $rabbitmq::params::ldap_server,
Optional[String] $ldap_user_dn_pattern = $rabbitmq::params::ldap_user_dn_pattern,
String $ldap_other_bind = $rabbitmq::params::ldap_other_bind,
Boolean $ldap_use_ssl = $rabbitmq::params::ldap_use_ssl,
Integer[1, 65535] $ldap_port = $rabbitmq::params::ldap_port,
Boolean $ldap_log = $rabbitmq::params::ldap_log,
Hash $ldap_config_variables = $rabbitmq::params::ldap_config_variables,
Integer[1, 65535] $stomp_port = $rabbitmq::params::stomp_port,
Boolean $stomp_ssl_only = $rabbitmq::params::stomp_ssl_only,
Boolean $wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change,
String $cluster_partition_handling = $rabbitmq::params::cluster_partition_handling,
Variant[Integer[-1,], Enum['unlimited', 'infinity']] $file_limit = $rabbitmq::params::file_limit,
Hash $environment_variables = $rabbitmq::params::environment_variables,
Hash $config_variables = $rabbitmq::params::config_variables,
Hash $config_kernel_variables = $rabbitmq::params::config_kernel_variables,
Hash $config_management_variables = $rabbitmq::params::config_management_variables,
Hash $config_additional_variables = $rabbitmq::params::config_additional_variables,
Optional[Array] $auth_backends = undef,
Optional[String] $key_content = undef,
Optional[Integer] $collect_statistics_interval = undef,
Boolean $ipv6 = $rabbitmq::params::ipv6,
String $inetrc_config = $rabbitmq::params::inetrc_config,
Stdlib::Absolutepath $inetrc_config_path = $rabbitmq::params::inetrc_config_path,
Boolean $ssl_erl_dist = $rabbitmq::params::ssl_erl_dist,
Optional[String] $rabbitmqadmin_package = $rabbitmq::params::rabbitmqadmin_package,
Array $archive_options = $rabbitmq::params::archive_options,
Array $loopback_users = $rabbitmq::params::loopback_users,
Boolean $admin_enable = $rabbitmq::params::admin_enable,
Enum['ram', 'disk', 'disc'] $cluster_node_type = $rabbitmq::params::cluster_node_type,
Array $cluster_nodes = $rabbitmq::params::cluster_nodes,
String $config = $rabbitmq::params::config,
Boolean $config_cluster = $rabbitmq::params::config_cluster,
Stdlib::Absolutepath $config_path = $rabbitmq::params::config_path,
Boolean $config_ranch = $rabbitmq::params::config_ranch,
Boolean $config_stomp = $rabbitmq::params::config_stomp,
Boolean $config_shovel = $rabbitmq::params::config_shovel,
Hash $config_shovel_statics = $rabbitmq::params::config_shovel_statics,
String $default_user = $rabbitmq::params::default_user,
String $default_pass = $rabbitmq::params::default_pass,
Boolean $delete_guest_user = $rabbitmq::params::delete_guest_user,
String $env_config = $rabbitmq::params::env_config,
Stdlib::Absolutepath $env_config_path = $rabbitmq::params::env_config_path,
Optional[String] $erlang_cookie = undef,
Optional[String] $interface = undef,
Optional[String] $management_ip_address = undef,
Integer[1, 65535] $management_port = $rabbitmq::params::management_port,
Boolean $management_ssl = $rabbitmq::params::management_ssl,
Optional[String] $management_hostname = undef,
Optional[String] $node_ip_address = undef,
Optional[Variant[Numeric, String]] $package_apt_pin = undef,
String $package_ensure = $rabbitmq::params::package_ensure,
Optional[String] $package_gpg_key = $rabbitmq::params::package_gpg_key,
Variant[String, Array] $package_name = $rabbitmq::params::package_name,
Optional[String] $package_source = undef,
Optional[String] $package_provider = undef,
Boolean $repos_ensure = $rabbitmq::params::repos_ensure,
Boolean $manage_python = $rabbitmq::params::manage_python,
String $rabbitmq_user = $rabbitmq::params::rabbitmq_user,
String $rabbitmq_group = $rabbitmq::params::rabbitmq_group,
Stdlib::Absolutepath $rabbitmq_home = $rabbitmq::params::rabbitmq_home,
Integer $port = $rabbitmq::params::port,
Boolean $tcp_keepalive = $rabbitmq::params::tcp_keepalive,
Integer $tcp_backlog = $rabbitmq::params::tcp_backlog,
Optional[Integer] $tcp_sndbuf = undef,
Optional[Integer] $tcp_recbuf = undef,
Optional[Integer] $heartbeat = undef,
Enum['running', 'stopped'] $service_ensure = $rabbitmq::params::service_ensure,
Boolean $service_manage = $rabbitmq::params::service_manage,
String $service_name = $rabbitmq::params::service_name,
Boolean $ssl = $rabbitmq::params::ssl,
Boolean $ssl_only = $rabbitmq::params::ssl_only,
Optional[Stdlib::Absolutepath] $ssl_cacert = undef,
Optional[Stdlib::Absolutepath] $ssl_cert = undef,
Optional[Stdlib::Absolutepath] $ssl_key = undef,
Optional[Integer] $ssl_depth = undef,
Optional[String] $ssl_cert_password = undef,
Integer[1, 65535] $ssl_port = $rabbitmq::params::ssl_port,
Optional[String] $ssl_interface = undef,
Integer[1, 65535] $ssl_management_port = $rabbitmq::params::ssl_management_port,
Integer[1, 65535] $ssl_stomp_port = $rabbitmq::params::ssl_stomp_port,
Enum['verify_none','verify_peer'] $ssl_verify = $rabbitmq::params::ssl_verify,
Boolean $ssl_fail_if_no_peer_cert = $rabbitmq::params::ssl_fail_if_no_peer_cert,
Enum['verify_none','verify_peer'] $ssl_management_verify = $rabbitmq::params::ssl_management_verify,
Boolean $ssl_management_fail_if_no_peer_cert = $rabbitmq::params::ssl_management_fail_if_no_peer_cert,
Optional[Array] $ssl_versions = undef,
Boolean $ssl_secure_renegotiate = $rabbitmq::params::ssl_secure_renegotiate,
Boolean $ssl_reuse_sessions = $rabbitmq::params::ssl_reuse_sessions,
Boolean $ssl_honor_cipher_order = $rabbitmq::params::ssl_honor_cipher_order,
Optional[Stdlib::Absolutepath] $ssl_dhfile = undef,
Array $ssl_ciphers = $rabbitmq::params::ssl_ciphers,
Boolean $stomp_ensure = $rabbitmq::params::stomp_ensure,
Boolean $ldap_auth = $rabbitmq::params::ldap_auth,
String $ldap_server = $rabbitmq::params::ldap_server,
Optional[String] $ldap_user_dn_pattern = $rabbitmq::params::ldap_user_dn_pattern,
String $ldap_other_bind = $rabbitmq::params::ldap_other_bind,
Boolean $ldap_use_ssl = $rabbitmq::params::ldap_use_ssl,
Integer[1, 65535] $ldap_port = $rabbitmq::params::ldap_port,
Boolean $ldap_log = $rabbitmq::params::ldap_log,
Hash $ldap_config_variables = $rabbitmq::params::ldap_config_variables,
Integer[1, 65535] $stomp_port = $rabbitmq::params::stomp_port,
Boolean $stomp_ssl_only = $rabbitmq::params::stomp_ssl_only,
Boolean $wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change,
String $cluster_partition_handling = $rabbitmq::params::cluster_partition_handling,
Variant[Integer[-1],Pattern[/^(infinity|\d+(:(infinity|\d+))?)$/]] $file_limit = $rabbitmq::params::file_limit,
Hash $environment_variables = $rabbitmq::params::environment_variables,
Hash $config_variables = $rabbitmq::params::config_variables,
Hash $config_kernel_variables = $rabbitmq::params::config_kernel_variables,
Hash $config_management_variables = $rabbitmq::params::config_management_variables,
Hash $config_additional_variables = $rabbitmq::params::config_additional_variables,
Optional[Array] $auth_backends = undef,
Optional[String] $key_content = undef,
Optional[Integer] $collect_statistics_interval = undef,
Boolean $ipv6 = $rabbitmq::params::ipv6,
String $inetrc_config = $rabbitmq::params::inetrc_config,
Stdlib::Absolutepath $inetrc_config_path = $rabbitmq::params::inetrc_config_path,
Boolean $ssl_erl_dist = $rabbitmq::params::ssl_erl_dist,
Optional[String] $rabbitmqadmin_package = $rabbitmq::params::rabbitmqadmin_package,
Array $archive_options = $rabbitmq::params::archive_options,
Array $loopback_users = $rabbitmq::params::loopback_users,
) inherits rabbitmq::params {

if $ssl_only and ! $ssl {
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
end
end

['unlimited', 'infinity', -1, 1234].each do |value|
['infinity', -1, 1234].each do |value|
context "with file_limit => '#{value}'" do
let(:params) { { file_limit: value } }

Expand Down

0 comments on commit b955458

Please sign in to comment.