diff --git a/examples/all.pp b/examples/all.pp index 19caf55b..7d996d75 100644 --- a/examples/all.pp +++ b/examples/all.pp @@ -10,7 +10,6 @@ Exec { logoutput => true } package { 'curl': ensure => present } - class { 'memcached': listen_ip => $swift_local_net_ip, } @@ -41,7 +40,7 @@ swift::storage::node { '2': manage_ring => true, zone => '2', storage_local_net_ip => $swift_local_net_ip, - require => Swift::Storage::Loopback[2] , + require => Swift::Storage::Loopback[2], } class { 'swift::ringbuilder': @@ -51,7 +50,6 @@ class { 'swift::ringbuilder': require => Class['swift'], } - # TODO should I enable swath in the default config? class { 'swift::proxy': proxy_local_net_ip => $swift_local_net_ip, @@ -59,7 +57,8 @@ class { 'swift::proxy': account_autocreate => true, require => Class['swift::ringbuilder'], } -class { ['swift::proxy::healthcheck', 'swift::proxy::cache']: } + +class {['swift::proxy::healthcheck', 'swift::proxy::cache']: } class { 'swift::proxy::tempauth': account_user_list => [ @@ -67,7 +66,7 @@ class { 'swift::proxy::tempauth': 'user' => 'admin', 'account' => 'admin', 'key' => 'admin', - 'groups' => [ 'admin', 'reseller_admin' ], + 'groups' => ['admin', 'reseller_admin'], }, { 'user' => 'tester', diff --git a/examples/site.pp b/examples/site.pp index 99ba46b3..59eaa677 100644 --- a/examples/site.pp +++ b/examples/site.pp @@ -21,7 +21,6 @@ # this site manifest serves as an example of how to # deploy various swift environments - #$swift_admin_password = 'admin_password' $swift_admin_password = hiera('admin_password', 'admin_password') @@ -29,7 +28,6 @@ $swift_admin_password = hiera('admin_password', 'admin_password') #$swift_shared_secret = 'changeme' $swift_shared_secret = hiera('swift_shared_secret', 'changeme') - #$swift_local_net_ip = $ipaddress_eth0 $swift_local_net_ip = hiera('swift_local_net_ip', $ipaddress_eth0) @@ -67,7 +65,6 @@ $swift_keystone_admin_password = hiera('admin_password', 'ChangeMe') # This service only contains the credentials for authenticating # swift node 'swift-keystone' { - # set up mysql server class { 'mysql::server': config_hash => { @@ -108,7 +105,6 @@ node 'swift-keystone' { password => $swift_admin_password, public_address => $swift_proxy_node, } - } # @@ -120,7 +116,6 @@ node 'swift-keystone' { # partitions # node /swift-storage/ { - class { 'swift': # not sure how I want to deal with this shared secret swift_hash_path_suffix => $swift_shared_secret, @@ -179,12 +174,9 @@ node /swift-storage/ { # collect resources for synchronizing the ring databases Swift::Ringsync<<||>> - } - node /swift-proxy/ { - class { 'swift': # not sure how I want to deal with this shared secret swift_hash_path_suffix => $swift_shared_secret, @@ -220,7 +212,7 @@ node /swift-proxy/ { } # configure all of the middlewares - class { [ + class {[ 'swift::proxy::account_quotas', 'swift::proxy::catch_errors', 'swift::proxy::container_quotas', diff --git a/manifests/auth_file.pp b/manifests/auth_file.pp index 5591142a..573b46d7 100644 --- a/manifests/auth_file.pp +++ b/manifests/auth_file.pp @@ -24,7 +24,6 @@ class swift::auth_file ( $admin_user = 'admin', $auth_url = 'http://127.0.0.1:5000/v3/' ) { - include swift::deps file { '/root/swiftrc': @@ -33,11 +32,9 @@ class swift::auth_file ( group => 'root', mode => '0600', tag => 'swift-file', - content => - " - export ST_USER=${admin_tenant}:${admin_user} - export ST_KEY=${admin_password} - export ST_AUTH=${auth_url} - ", + content => " +export ST_USER=${admin_tenant}:${admin_user} +export ST_KEY=${admin_password} +export ST_AUTH=${auth_url}", } } diff --git a/manifests/bench.pp b/manifests/bench.pp index 7ea1ef68..6d8259ae 100644 --- a/manifests/bench.pp +++ b/manifests/bench.pp @@ -82,8 +82,7 @@ class swift::bench ( $num_gets = '10000', $num_containers = '20', $delete = 'yes', -){ - +) { include swift::deps swift_bench_config { diff --git a/manifests/client.pp b/manifests/client.pp index 3f3695d8..abb838b5 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -11,7 +11,6 @@ class swift::client ( $ensure = 'present', ) { - include swift::deps include swift::params @@ -20,5 +19,4 @@ class swift::client ( name => $swift::params::client_package, tag => 'openstack', } - } diff --git a/manifests/config.pp b/manifests/config.pp index e8deb9d5..6dc1c11f 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -54,7 +54,6 @@ class swift::config ( Hash $swift_object_config = {}, Hash $swift_internal_client_config = {}, ) { - include swift::deps create_resources('swift_config', $swift_config) diff --git a/manifests/constraints.pp b/manifests/constraints.pp index 87640d6c..5e3e7cdf 100644 --- a/manifests/constraints.pp +++ b/manifests/constraints.pp @@ -82,7 +82,7 @@ # (Optional) Prefix used for hiddne auto-created accounts. # Defaults to $facts['os_service_default'] # -class swift::constraints( +class swift::constraints ( $max_file_size = $facts['os_service_default'], $max_meta_name_length = $facts['os_service_default'], $max_meta_value_length = $facts['os_service_default'], @@ -98,7 +98,6 @@ class swift::constraints( $valid_api_versions = $facts['os_service_default'], $auto_create_account_prefix = $facts['os_service_default'], ) { - include swift::deps include swift::params diff --git a/manifests/containerreconciler.pp b/manifests/containerreconciler.pp index 5f68699d..6ed70491 100644 --- a/manifests/containerreconciler.pp +++ b/manifests/containerreconciler.pp @@ -112,7 +112,7 @@ # in the proxy config. # Defaults to false. # -class swift::containerreconciler( +class swift::containerreconciler ( Boolean $manage_service = true, Boolean $enabled = true, $package_ensure = 'present', @@ -136,7 +136,6 @@ class swift::containerreconciler( $log_max_line_length = $facts['os_service_default'], Boolean $purge_config = false, ) inherits swift::params { - include swift::deps Swift_container_reconciler_config<||> ~> Service['swift-container-reconciler'] @@ -160,7 +159,6 @@ class swift::containerreconciler( # only add memcache servers if 'cache' is included in the pipeline if !empty(grep(any2array($pipeline), 'cache')) { - swift_container_reconciler_config { 'filter:cache/memcache_servers': value => join(any2array($memcache_servers), ','); 'filter:cache/tls_enabled': value => $cache_tls_enabled; @@ -220,5 +218,4 @@ class swift::containerreconciler( config_file_name => 'container-reconciler.conf', service_provider => $service_provider, } - } diff --git a/manifests/deps.pp b/manifests/deps.pp index b9c5aee6..813de808 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -71,5 +71,4 @@ class swift::deps { # Installation or config changes will always restart services. Anchor['swift::install::end'] ~> Anchor['swift::service::begin'] Anchor['swift::config::end'] ~> Anchor['swift::service::begin'] - } diff --git a/manifests/dispersion.pp b/manifests/dispersion.pp index 4d8fcab1..99c2adad 100644 --- a/manifests/dispersion.pp +++ b/manifests/dispersion.pp @@ -79,7 +79,6 @@ class swift::dispersion ( $concurrency = 25, $dump_json = 'no' ) { - include swift::deps include swift::params @@ -115,5 +114,4 @@ class swift::dispersion ( # lint:endignore require => Package['swiftclient'], } - } diff --git a/manifests/init.pp b/manifests/init.pp index 7d180dc1..0bacdd53 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -44,13 +44,12 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -class swift( +class swift ( $swift_hash_path_suffix = $facts['os_service_default'], $swift_hash_path_prefix = $facts['os_service_default'], $package_ensure = 'present', Boolean $purge_config = false, ) { - include swift::deps include swift::params include swift::client diff --git a/manifests/internal_client.pp b/manifests/internal_client.pp index 8fa9cf16..b617d5ba 100644 --- a/manifests/internal_client.pp +++ b/manifests/internal_client.pp @@ -85,7 +85,6 @@ class swift::internal_client ( $recoverable_node_timeout = $facts['os_service_default'], Boolean $purge_config = false, ) inherits swift::params { - include swift::deps include swift::params diff --git a/manifests/internal_client/cache.pp b/manifests/internal_client/cache.pp index dec679bd..2d657d4e 100644 --- a/manifests/internal_client/cache.pp +++ b/manifests/internal_client/cache.pp @@ -47,7 +47,7 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -class swift::internal_client::cache( +class swift::internal_client::cache ( $memcache_servers = ['127.0.0.1:11211'], $tls_enabled = $facts['os_service_default'], $tls_cafile = $facts['os_service_default'], @@ -55,7 +55,6 @@ class swift::internal_client::cache( $tls_keyfile = $facts['os_service_default'], $memcache_max_connections = '2' ) { - include swift::deps # require the memcached class if its on the same machine @@ -72,5 +71,4 @@ class swift::internal_client::cache( 'filter:cache/tls_keyfile': value => $tls_keyfile; 'filter:cache/memcache_max_connections': value => $memcache_max_connections; } - } diff --git a/manifests/internal_client/catch_errors.pp b/manifests/internal_client/catch_errors.pp index 7ce6b8ce..d0422f87 100644 --- a/manifests/internal_client/catch_errors.pp +++ b/manifests/internal_client/catch_errors.pp @@ -15,8 +15,7 @@ # # Copyright 2012 eNovance licensing@enovance.com # -class swift::internal_client::catch_errors() { - +class swift::internal_client::catch_errors { include swift::deps swift_internal_client_config { diff --git a/manifests/internal_client/proxy_logging.pp b/manifests/internal_client/proxy_logging.pp index a1976435..fcdfe454 100644 --- a/manifests/internal_client/proxy_logging.pp +++ b/manifests/internal_client/proxy_logging.pp @@ -6,7 +6,6 @@ # Joe Topjian joe@topjian.net # class swift::internal_client::proxy_logging { - include swift::deps swift_internal_client_config { diff --git a/manifests/internal_client/symlink.pp b/manifests/internal_client/symlink.pp index 1bf751d5..06299949 100644 --- a/manifests/internal_client/symlink.pp +++ b/manifests/internal_client/symlink.pp @@ -29,10 +29,9 @@ # # shi.yan@ardc.edu.au # -class swift::internal_client::symlink( +class swift::internal_client::symlink ( $symloop_max = $facts['os_service_default'], ) { - include swift::deps swift_internal_client_config { diff --git a/manifests/keymaster.pp b/manifests/keymaster.pp index 9ffdb27e..3e50a7ce 100644 --- a/manifests/keymaster.pp +++ b/manifests/keymaster.pp @@ -75,7 +75,7 @@ # # Thiago da Silva thiago@redhat.com # -class swift::keymaster( +class swift::keymaster ( String[1] $password, $api_class = 'barbican', $key_id = $facts['os_service_default'], @@ -90,7 +90,6 @@ class swift::keymaster( $user_domain_id = 'default', $meta_version_to_write = $facts['os_service_default'], ) { - include swift::deps include swift::params @@ -120,4 +119,3 @@ class swift::keymaster( 'kms_keymaster/meta_version_to_write': value => $meta_version_to_write; } } - diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index ca8978e4..40da0895 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -107,13 +107,13 @@ # (optional) The endpoint's internal url. (Defaults to 'http://127.0.0.1:8080') # This url should *not* contain any trailing '/'. # -class swift::keystone::auth( +class swift::keystone::auth ( String[1] $password, String[1] $auth_name = 'swift', String[1] $tenant = 'services', Array[String[1]] $roles = ['admin'], String[1] $system_scope = 'all', - Array[String[1]]$system_roles = [], + Array[String[1]] $system_roles = [], String[1] $email = 'swift@localhost', String[1] $region = 'RegionOne', Array[String[1]] $operator_roles = ['admin', 'SwiftOperator'], @@ -134,7 +134,6 @@ class swift::keystone::auth( Keystone::EndpointUrl $admin_url_s3 = 'http://127.0.0.1:8080', Keystone::EndpointUrl $internal_url_s3 = 'http://127.0.0.1:8080', ) { - include swift::deps if $service_name == $service_name_s3 { diff --git a/manifests/keystone/dispersion.pp b/manifests/keystone/dispersion.pp index a8fd7d23..2e0f5a11 100644 --- a/manifests/keystone/dispersion.pp +++ b/manifests/keystone/dispersion.pp @@ -29,13 +29,12 @@ # # Francois Charlier fcharlier@ploup.net # -class swift::keystone::dispersion( +class swift::keystone::dispersion ( $auth_user = 'dispersion', $auth_pass = 'dispersion_password', $email = 'swift@localhost', $tenant = 'services' ) { - include swift::deps keystone_user { $auth_user: @@ -51,5 +50,4 @@ class swift::keystone::dispersion( Keystone_user<| title == $auth_user |> ~> Keystone_user_role<| title == "${auth_user}@${tenant}" |> - } diff --git a/manifests/memcache.pp b/manifests/memcache.pp index 064f81cb..22d78386 100644 --- a/manifests/memcache.pp +++ b/manifests/memcache.pp @@ -76,7 +76,6 @@ class swift::memcache ( $io_timeout = $facts['os_service_default'], Boolean $purge_config = false, ) { - include swift::deps include swift::params diff --git a/manifests/objectexpirer.pp b/manifests/objectexpirer.pp index cf32a58d..dc8731cb 100644 --- a/manifests/objectexpirer.pp +++ b/manifests/objectexpirer.pp @@ -129,7 +129,7 @@ # (optional) Account name used for expiring objects. # Defaults to undef. # -class swift::objectexpirer( +class swift::objectexpirer ( Boolean $manage_service = true, Boolean $enabled = true, $package_ensure = 'present', @@ -158,7 +158,6 @@ class swift::objectexpirer( # DEPRECATED PARAMETERS $expiring_objects_account_name = undef, ) inherits swift::params { - include swift::deps Swift_object_expirer_config<||> ~> Service['swift-object-expirer'] @@ -196,7 +195,6 @@ class swift::objectexpirer( # only add memcache servers if 'cache' is included in the pipeline if !empty(grep(any2array($pipeline), 'cache')) { - swift_object_expirer_config { 'filter:cache/memcache_servers': value => join(any2array($memcache_servers), ','); 'filter:cache/tls_enabled': value => $cache_tls_enabled; diff --git a/manifests/params.pp b/manifests/params.pp index 7320041c..3fd93044 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -72,6 +72,7 @@ class swift::params { fail("Unsupported osfamily: ${facts['os']['family']}") } } + $swift_init_service_names = [ 'swift-proxy-server', 'swift-object-auditor', diff --git a/manifests/proxy.pp b/manifests/proxy.pp index 74c7ef4e..4291e882 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -206,7 +206,7 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -class swift::proxy( +class swift::proxy ( $proxy_local_net_ip, $port = '8080', $cert_file = $facts['os_service_default'], @@ -253,12 +253,11 @@ class swift::proxy( Swift::ServiceProvider $service_provider = $swift::params::service_provider, Boolean $purge_config = false, ) inherits swift::params { - include swift::deps - if(member($pipeline, 'tempauth')) { + if member($pipeline, 'tempauth') { $auth_type = 'tempauth' - } elsif(member($pipeline, 'keystone')) { + } elsif member($pipeline, 'keystone') { $auth_type = 'keystone' } else { warning('no auth type provided in the pipeline') @@ -269,7 +268,7 @@ class swift::proxy( fail('proxy-server must be the last element in pipeline') } - if($auth_type == 'tempauth' and ! $account_autocreate ){ + if $auth_type == 'tempauth' and !$account_autocreate { fail('account_autocreate must be set to true when auth_type is tempauth') } diff --git a/manifests/proxy/account_quotas.pp b/manifests/proxy/account_quotas.pp index 32d9fd7e..d46bd74d 100644 --- a/manifests/proxy/account_quotas.pp +++ b/manifests/proxy/account_quotas.pp @@ -17,8 +17,7 @@ # # Configure Swift Account Quotas # -class swift::proxy::account_quotas() { - +class swift::proxy::account_quotas { include swift::deps swift_proxy_config { diff --git a/manifests/proxy/audit.pp b/manifests/proxy/audit.pp index 961f6f1e..8bef1069 100644 --- a/manifests/proxy/audit.pp +++ b/manifests/proxy/audit.pp @@ -21,7 +21,6 @@ class swift::proxy::audit ( $filter_factory = 'keystonemiddleware.audit:filter_factory', $audit_map_file = '/etc/pycadf/swift_api_audit_map.conf', ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/authtoken.pp b/manifests/proxy/authtoken.pp index 5e2696a7..a9e956a8 100644 --- a/manifests/proxy/authtoken.pp +++ b/manifests/proxy/authtoken.pp @@ -92,7 +92,7 @@ # # Copyright 2012 Puppetlabs Inc, unless otherwise noted. # -class swift::proxy::authtoken( +class swift::proxy::authtoken ( String[1] $password, $delay_auth_decision = 1, $cache = 'swift.cache', @@ -111,7 +111,6 @@ class swift::proxy::authtoken( $service_type = $facts['os_service_default'], $interface = $facts['os_service_default'], ) inherits swift::params { - include swift::deps if is_service_default($system_scope) { diff --git a/manifests/proxy/bulk.pp b/manifests/proxy/bulk.pp index 2d84cefa..3043f3ee 100644 --- a/manifests/proxy/bulk.pp +++ b/manifests/proxy/bulk.pp @@ -52,7 +52,7 @@ # the connection alive while its processing the request. # Defaults to $facts['os_service_default']. # -class swift::proxy::bulk( +class swift::proxy::bulk ( $max_containers_per_extraction = $facts['os_service_default'], $max_failed_extractions = $facts['os_service_default'], $max_failed_deletes = $facts['os_service_default'], @@ -61,7 +61,6 @@ class swift::proxy::bulk( $delete_concurrency = $facts['os_service_default'], $yield_frequency = $facts['os_service_default'], ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/cache.pp b/manifests/proxy/cache.pp index ecb4c841..dd160b56 100644 --- a/manifests/proxy/cache.pp +++ b/manifests/proxy/cache.pp @@ -47,7 +47,7 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -class swift::proxy::cache( +class swift::proxy::cache ( $memcache_servers = ['127.0.0.1:11211'], $tls_enabled = $facts['os_service_default'], $tls_cafile = $facts['os_service_default'], @@ -55,7 +55,6 @@ class swift::proxy::cache( $tls_keyfile = $facts['os_service_default'], $memcache_max_connections = '2' ) { - include swift::deps # require the memcached class if its on the same machine @@ -72,5 +71,4 @@ class swift::proxy::cache( 'filter:cache/tls_keyfile': value => $tls_keyfile; 'filter:cache/memcache_max_connections': value => $memcache_max_connections; } - } diff --git a/manifests/proxy/catch_errors.pp b/manifests/proxy/catch_errors.pp index 9001c0bd..9c9f31dd 100644 --- a/manifests/proxy/catch_errors.pp +++ b/manifests/proxy/catch_errors.pp @@ -15,8 +15,7 @@ # # Copyright 2012 eNovance licensing@enovance.com # -class swift::proxy::catch_errors() { - +class swift::proxy::catch_errors { include swift::deps swift_proxy_config { diff --git a/manifests/proxy/ceilometer.pp b/manifests/proxy/ceilometer.pp index d9a17a32..2a59595c 100644 --- a/manifests/proxy/ceilometer.pp +++ b/manifests/proxy/ceilometer.pp @@ -183,7 +183,7 @@ # # Copyright 2013 eNovance licensing@enovance.com # -class swift::proxy::ceilometer( +class swift::proxy::ceilometer ( String[1] $password, String[1] $default_transport_url, $driver = $facts['os_service_default'], @@ -221,7 +221,6 @@ class swift::proxy::ceilometer( # DEPRECATED PARAMETERS $rabbit_heartbeat_in_pthread = undef, ) inherits swift { - include swift::deps include swift::params @@ -297,5 +296,4 @@ class swift::proxy::ceilometer( name => $swift::params::ceilometermiddleware_package_name, tag => ['openstack', 'swift-support-package'], } - } diff --git a/manifests/proxy/cname_lookup.pp b/manifests/proxy/cname_lookup.pp index dfb55f20..c9447a54 100644 --- a/manifests/proxy/cname_lookup.pp +++ b/manifests/proxy/cname_lookup.pp @@ -42,7 +42,7 @@ # Default to $facts['os_service_default'] # # -class swift::proxy::cname_lookup( +class swift::proxy::cname_lookup ( $log_name = $facts['os_service_default'], $log_facility = $facts['os_service_default'], $log_level = $facts['os_service_default'], @@ -52,7 +52,6 @@ class swift::proxy::cname_lookup( $lookup_depth = $facts['os_service_default'], $nameservers = $facts['os_service_default'], ) { - include swift::deps include swift::params diff --git a/manifests/proxy/container_quotas.pp b/manifests/proxy/container_quotas.pp index 1905ff9c..310d4afc 100644 --- a/manifests/proxy/container_quotas.pp +++ b/manifests/proxy/container_quotas.pp @@ -17,8 +17,7 @@ # # Configure Swift Container Quotas # -class swift::proxy::container_quotas() { - +class swift::proxy::container_quotas { include swift::deps swift_proxy_config { diff --git a/manifests/proxy/container_sync.pp b/manifests/proxy/container_sync.pp index cb941c06..12198a88 100644 --- a/manifests/proxy/container_sync.pp +++ b/manifests/proxy/container_sync.pp @@ -17,11 +17,10 @@ # # Denis Egorenko # -class swift::proxy::container_sync( +class swift::proxy::container_sync ( $allow_full_urls = $facts['os_service_default'], $current = $facts['os_service_default'], ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/copy.pp b/manifests/proxy/copy.pp index fde47708..4fdf0b3c 100644 --- a/manifests/proxy/copy.pp +++ b/manifests/proxy/copy.pp @@ -18,7 +18,6 @@ class swift::proxy::copy ( $object_post_as_copy = true ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/crossdomain.pp b/manifests/proxy/crossdomain.pp index cb572511..e8df49c3 100644 --- a/manifests/proxy/crossdomain.pp +++ b/manifests/proxy/crossdomain.pp @@ -14,7 +14,6 @@ class swift::proxy::crossdomain ( $cross_domain_policy = '', ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/dlo.pp b/manifests/proxy/dlo.pp index 508bf59e..6174ce5b 100644 --- a/manifests/proxy/dlo.pp +++ b/manifests/proxy/dlo.pp @@ -34,7 +34,6 @@ class swift::proxy::dlo ( $rate_limit_segments_per_sec = $facts['os_service_default'], $max_get_time = $facts['os_service_default'], ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/domain_remap.pp b/manifests/proxy/domain_remap.pp index db7b4863..a74ef9e9 100644 --- a/manifests/proxy/domain_remap.pp +++ b/manifests/proxy/domain_remap.pp @@ -67,7 +67,7 @@ # shi.yan@ardc.edu.au # # -class swift::proxy::domain_remap( +class swift::proxy::domain_remap ( $log_name = $facts['os_service_default'], $log_facility = $facts['os_service_default'], $log_level = $facts['os_service_default'], @@ -79,7 +79,6 @@ class swift::proxy::domain_remap( $default_reseller_prefix = $facts['os_service_default'], $mangle_client_paths = $facts['os_service_default'], ) { - include swift::deps $reseller_prefixes_real = join(any2array($reseller_prefixes), ',') diff --git a/manifests/proxy/encryption.pp b/manifests/proxy/encryption.pp index 36ac456d..09d98a36 100644 --- a/manifests/proxy/encryption.pp +++ b/manifests/proxy/encryption.pp @@ -16,7 +16,6 @@ class swift::proxy::encryption ( $disable_encryption = false ) { - include swift::deps swift_proxy_config { @@ -24,4 +23,3 @@ class swift::proxy::encryption ( 'filter:encryption/disable_encryption': value => $disable_encryption; } } - diff --git a/manifests/proxy/etag_quoter.pp b/manifests/proxy/etag_quoter.pp index 08b99b53..8794be5b 100644 --- a/manifests/proxy/etag_quoter.pp +++ b/manifests/proxy/etag_quoter.pp @@ -24,7 +24,6 @@ class swift::proxy::etag_quoter ( $enabled_by_default = $facts['os_service_default'] ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/formpost.pp b/manifests/proxy/formpost.pp index d26575c2..e0f6d824 100644 --- a/manifests/proxy/formpost.pp +++ b/manifests/proxy/formpost.pp @@ -21,10 +21,9 @@ # # Copyright 2012 eNovance licensing@enovance.com # -class swift::proxy::formpost( +class swift::proxy::formpost ( $allowed_digests = $facts['os_service_default'], ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/gatekeeper.pp b/manifests/proxy/gatekeeper.pp index 845e98c3..ca24391b 100644 --- a/manifests/proxy/gatekeeper.pp +++ b/manifests/proxy/gatekeeper.pp @@ -45,7 +45,7 @@ # # Copyright 2014 UnitedStack licensing@unitedstack.com # -class swift::proxy::gatekeeper( +class swift::proxy::gatekeeper ( $shunt_inbound_x_timestamp = $facts['os_service_default'], $allow_reserved_names_header = $facts['os_service_default'], $log_name = 'gatekeeper', @@ -54,7 +54,6 @@ class swift::proxy::gatekeeper( $log_headers = $facts['os_service_default'], $log_address = '/dev/log' ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/healthcheck.pp b/manifests/proxy/healthcheck.pp index d2f33eec..62c7b45d 100644 --- a/manifests/proxy/healthcheck.pp +++ b/manifests/proxy/healthcheck.pp @@ -13,8 +13,7 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -class swift::proxy::healthcheck() { - +class swift::proxy::healthcheck { include swift::deps swift_proxy_config { diff --git a/manifests/proxy/keymaster.pp b/manifests/proxy/keymaster.pp index c20d7726..c8ac42d9 100644 --- a/manifests/proxy/keymaster.pp +++ b/manifests/proxy/keymaster.pp @@ -13,12 +13,10 @@ class swift::proxy::keymaster ( $encryption_root_secret, ) { - include swift::deps swift_proxy_config { 'filter:keymaster/use': value => 'egg:swift#keymaster'; 'filter:keymaster/encryption_root_secret': value => $encryption_root_secret, secret => true; } - } diff --git a/manifests/proxy/keystone.pp b/manifests/proxy/keystone.pp index 987cc93c..3ccf86ec 100644 --- a/manifests/proxy/keystone.pp +++ b/manifests/proxy/keystone.pp @@ -37,14 +37,13 @@ # Dan Bode dan@puppetlabs.com # Francois Charlier fcharlier@ploup.net # -class swift::proxy::keystone( +class swift::proxy::keystone ( $operator_roles = ['admin', 'SwiftOperator'], $reseller_prefix = 'AUTH_', $reseller_admin_role = undef, $project_reader_roles = $facts['os_service_default'], $system_reader_roles = $facts['os_service_default'], ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/kms_keymaster.pp b/manifests/proxy/kms_keymaster.pp index 35c71e4a..54972089 100644 --- a/manifests/proxy/kms_keymaster.pp +++ b/manifests/proxy/kms_keymaster.pp @@ -13,7 +13,6 @@ class swift::proxy::kms_keymaster ( $keymaster_config_path = '/etc/swift/keymaster.conf' ) { - include swift::deps swift_proxy_config { @@ -21,4 +20,3 @@ class swift::proxy::kms_keymaster ( 'filter:kms_keymaster/keymaster_config_path': value => $keymaster_config_path; } } - diff --git a/manifests/proxy/listing_formats.pp b/manifests/proxy/listing_formats.pp index 755a7205..778ec6a7 100644 --- a/manifests/proxy/listing_formats.pp +++ b/manifests/proxy/listing_formats.pp @@ -17,7 +17,6 @@ # class swift::proxy::listing_formats ( ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/proxy_logging.pp b/manifests/proxy/proxy_logging.pp index 706903de..ffaf0817 100644 --- a/manifests/proxy/proxy_logging.pp +++ b/manifests/proxy/proxy_logging.pp @@ -6,7 +6,6 @@ # Joe Topjian joe@topjian.net # class swift::proxy::proxy_logging { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/ratelimit.pp b/manifests/proxy/ratelimit.pp index 4f695b37..7090b5ce 100644 --- a/manifests/proxy/ratelimit.pp +++ b/manifests/proxy/ratelimit.pp @@ -47,7 +47,7 @@ # # Copyright 2012 eNovance licensing@enovance.com # -class swift::proxy::ratelimit( +class swift::proxy::ratelimit ( $clock_accuracy = $facts['os_service_default'], $max_sleep_time_seconds = $facts['os_service_default'], $log_sleep_time_seconds = $facts['os_service_default'], @@ -56,7 +56,6 @@ class swift::proxy::ratelimit( Hash $container_ratelimit = {}, Hash $container_listing_ratelimit = {}, ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/read_only.pp b/manifests/proxy/read_only.pp index 74646fad..3fc6a383 100644 --- a/manifests/proxy/read_only.pp +++ b/manifests/proxy/read_only.pp @@ -12,11 +12,10 @@ # (optional) Allow deletes. # Defauls to $facts['os_service_default'] # -class swift::proxy::read_only( +class swift::proxy::read_only ( $read_only = $facts['os_service_default'], $allow_deletes = $facts['os_service_default'] ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/s3api.pp b/manifests/proxy/s3api.pp index 122c9954..d9ef650a 100644 --- a/manifests/proxy/s3api.pp +++ b/manifests/proxy/s3api.pp @@ -72,7 +72,7 @@ # Override the default log routing for s3api middleware # Defaults to $facts['os_service_default']. # -class swift::proxy::s3api( +class swift::proxy::s3api ( $allow_no_owner = $facts['os_service_default'], $location = $facts['os_service_default'], $dns_compliant_bucket_names = $facts['os_service_default'], @@ -90,7 +90,6 @@ class swift::proxy::s3api( $min_segment_size = $facts['os_service_default'], $log_name = $facts['os_service_default'], ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/s3token.pp b/manifests/proxy/s3token.pp index e368bd43..743e0925 100644 --- a/manifests/proxy/s3token.pp +++ b/manifests/proxy/s3token.pp @@ -81,7 +81,7 @@ # # Copyright 2012 eNovance licensing@enovance.com # -class swift::proxy::s3token( +class swift::proxy::s3token ( String[1] $password, $auth_uri = 'http://127.0.0.1:5000', $reseller_prefix = 'AUTH_', @@ -96,7 +96,6 @@ class swift::proxy::s3token( $project_domain_id = 'default', $system_scope = $facts['os_service_default'], ) { - include swift::deps if is_service_default($system_scope) { diff --git a/manifests/proxy/slo.pp b/manifests/proxy/slo.pp index 1766f9dd..fc54fa03 100644 --- a/manifests/proxy/slo.pp +++ b/manifests/proxy/slo.pp @@ -73,7 +73,6 @@ class swift::proxy::slo ( $yield_frequency = $facts['os_service_default'], $allow_async_delete = $facts['os_service_default'], ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/staticweb.pp b/manifests/proxy/staticweb.pp index 6ed8bbcf..df57e584 100644 --- a/manifests/proxy/staticweb.pp +++ b/manifests/proxy/staticweb.pp @@ -22,10 +22,9 @@ # # Copyright 2012 eNovance licensing@enovance.com # -class swift::proxy::staticweb( +class swift::proxy::staticweb ( $url_base = $facts['os_service_default'] ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/symlink.pp b/manifests/proxy/symlink.pp index 388cd43c..695e3096 100644 --- a/manifests/proxy/symlink.pp +++ b/manifests/proxy/symlink.pp @@ -29,10 +29,9 @@ # # shi.yan@ardc.edu.au # -class swift::proxy::symlink( +class swift::proxy::symlink ( $symloop_max = $facts['os_service_default'], ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/tempauth.pp b/manifests/proxy/tempauth.pp index 183b9cd3..8ff0a926 100644 --- a/manifests/proxy/tempauth.pp +++ b/manifests/proxy/tempauth.pp @@ -71,7 +71,7 @@ class swift::proxy::tempauth ( 'user' => 'admin', 'account' => 'admin', 'key' => 'admin', - 'groups' => [ 'admin', 'reseller_admin' ], + 'groups' => ['admin', 'reseller_admin'], }, ], Optional[String[1]] $reseller_prefix = undef, @@ -80,10 +80,9 @@ class swift::proxy::tempauth ( Optional[Boolean] $allow_overrides = undef, Optional[Enum['http', 'https', 'default']] $storage_url_scheme = undef, ) { - include swift::deps - if ($reseller_prefix) { + if $reseller_prefix { $reseller_prefix_upcase = upcase($reseller_prefix) } else { $reseller_prefix_upcase = $reseller_prefix diff --git a/manifests/proxy/tempauth_account.pp b/manifests/proxy/tempauth_account.pp index f80cc41a..ae5a4086 100644 --- a/manifests/proxy/tempauth_account.pp +++ b/manifests/proxy/tempauth_account.pp @@ -11,8 +11,7 @@ # # Adam Vinsh # -define swift::proxy::tempauth_account() { - +define swift::proxy::tempauth_account { include swift::deps # strip white space and split string into array elements around ',' diff --git a/manifests/proxy/tempurl.pp b/manifests/proxy/tempurl.pp index ee77b802..ace80ce7 100644 --- a/manifests/proxy/tempurl.pp +++ b/manifests/proxy/tempurl.pp @@ -56,7 +56,6 @@ class swift::proxy::tempurl ( $outgoing_allow_headers = $facts['os_service_default'], $allowed_digests = $facts['os_service_default'], ) { - include swift::deps swift_proxy_config { diff --git a/manifests/proxy/versioned_writes.pp b/manifests/proxy/versioned_writes.pp index f5466fab..6e3e6f57 100644 --- a/manifests/proxy/versioned_writes.pp +++ b/manifests/proxy/versioned_writes.pp @@ -14,7 +14,6 @@ class swift::proxy::versioned_writes ( $allow_versioned_writes = false ) { - include swift::deps swift_proxy_config { diff --git a/manifests/ringbuilder.pp b/manifests/ringbuilder.pp index 5a183a31..50311427 100644 --- a/manifests/ringbuilder.pp +++ b/manifests/ringbuilder.pp @@ -24,16 +24,15 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -class swift::ringbuilder( - $part_power = undef, - $replicas = undef, +class swift::ringbuilder ( + $part_power = undef, + $replicas = undef, $min_part_hours = undef ) { - include swift::deps Class['swift'] -> Class['swift::ringbuilder'] - swift::ringbuilder::create{ ['object', 'account', 'container']: + swift::ringbuilder::create { ['object', 'account', 'container']: part_power => $part_power, replicas => $replicas, min_part_hours => $min_part_hours, @@ -45,6 +44,5 @@ class swift::ringbuilder( Swift::Ringbuilder::Create['account'] -> Ring_account_device <| |> ~> Swift::Ringbuilder::Rebalance['account'] - swift::ringbuilder::rebalance{ ['object', 'account', 'container']: } - + swift::ringbuilder::rebalance { ['object', 'account', 'container']: } } diff --git a/manifests/ringbuilder/create.pp b/manifests/ringbuilder/create.pp index c78048fc..3273f56d 100644 --- a/manifests/ringbuilder/create.pp +++ b/manifests/ringbuilder/create.pp @@ -35,14 +35,13 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -define swift::ringbuilder::create( +define swift::ringbuilder::create ( Swift::RingType $ring_type = $name, $part_power = 18, $replicas = 3, $min_part_hours = 24, $user = 'root' ) { - include swift::deps exec { "create_${ring_type}": @@ -52,5 +51,4 @@ define swift::ringbuilder::create( creates => "/etc/swift/${ring_type}.builder", before => Anchor['swift::config::end'], } - } diff --git a/manifests/ringbuilder/policy_ring.pp b/manifests/ringbuilder/policy_ring.pp index 1776872b..724dd6de 100644 --- a/manifests/ringbuilder/policy_ring.pp +++ b/manifests/ringbuilder/policy_ring.pp @@ -37,13 +37,12 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -define swift::ringbuilder::policy_ring( +define swift::ringbuilder::policy_ring ( Pattern[/^\d+$/] $policy_id = $name, $part_power = undef, $replicas = undef, $min_part_hours = undef, ) { - include swift::deps Class['swift'] -> Swift::Ringbuilder::Policy_ring[$policy_id] @@ -53,13 +52,12 @@ define swift::ringbuilder::policy_ring( $ring_builder = "object-${policy_id}" } - swift::ringbuilder::create{ $ring_builder : + swift::ringbuilder::create { $ring_builder : part_power => $part_power, replicas => $replicas, min_part_hours => $min_part_hours, } - swift::ringbuilder::rebalance{ $ring_builder: } + swift::ringbuilder::rebalance { $ring_builder: } Swift::Ringbuilder::Create[$ring_builder] -> Ring_object_device <| |> ~> Swift::Ringbuilder::Rebalance[$ring_builder] - } diff --git a/manifests/ringbuilder/rebalance.pp b/manifests/ringbuilder/rebalance.pp index e65a8fd4..b3ec8eac 100644 --- a/manifests/ringbuilder/rebalance.pp +++ b/manifests/ringbuilder/rebalance.pp @@ -12,11 +12,10 @@ # [*seed*] # Optional. Seed value used to seed pythons pseudo-random for ringbuilding. # -define swift::ringbuilder::rebalance( +define swift::ringbuilder::rebalance ( Swift::RingType $ring_type = $name, Optional[Variant[Integer[0], Pattern[/^\d+$/]]] $seed = undef ) { - include swift::deps exec { "rebalance_${ring_type}": diff --git a/manifests/ringserver.pp b/manifests/ringserver.pp index d235b1cc..8ec46a50 100644 --- a/manifests/ringserver.pp +++ b/manifests/ringserver.pp @@ -29,12 +29,11 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -class swift::ringserver( +class swift::ringserver ( $local_net_ip, $max_connections = 5, $rsync_use_xinetd = $swift::params::xinetd_available, ) inherits swift::params { - include swift::deps Class['swift::ringbuilder'] -> Class['swift::ringserver'] diff --git a/manifests/ringsync.pp b/manifests/ringsync.pp index c115c70a..a93b0526 100644 --- a/manifests/ringsync.pp +++ b/manifests/ringsync.pp @@ -5,11 +5,10 @@ # [*ring_type*] # (optional) The type of ring to create. Accepts object|container|account # -define swift::ringsync( +define swift::ringsync ( String[1] $ring_server, Swift::RingType $ring_type = $name, ) { - include swift::deps Exec { path => '/usr/bin' } diff --git a/manifests/service.pp b/manifests/service.pp index 7944527e..20b9d6e5 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -41,7 +41,7 @@ # [*service_tag*] # (optional) Additional tag to be added to the service resource # -define swift::service( +define swift::service ( String[1] $os_family_service_name, String[1] $config_file_name, $service_ensure = undef, @@ -51,11 +51,10 @@ define swift::service( $service_require = undef, Optional[String[1]] $service_tag = undef, ) { - include swift::deps include swift::params - if(! member($swift::params::swift_init_service_names, $name)) { + if !member($swift::params::swift_init_service_names, $name) { fail("swift::service name: ${name} is not a valid swift_init_service_name") } diff --git a/manifests/storage.pp b/manifests/storage.pp index 2185acbe..627108fd 100644 --- a/manifests/storage.pp +++ b/manifests/storage.pp @@ -24,11 +24,10 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -class swift::storage( +class swift::storage ( $storage_local_net_ip, $rsync_use_xinetd = $swift::params::xinetd_available, ) inherits swift::params { - include swift::deps if $rsync_use_xinetd and ! $swift::params::xinetd_available { diff --git a/manifests/storage/account.pp b/manifests/storage/account.pp index efa33568..986e9abd 100644 --- a/manifests/storage/account.pp +++ b/manifests/storage/account.pp @@ -26,14 +26,13 @@ # See README for more details. # Defaults to $swift::params::service_provider. # -class swift::storage::account( +class swift::storage::account ( Boolean $manage_service = true, Boolean $enabled = true, $package_ensure = 'present', String[1] $config_file_name = 'account-server.conf', Swift::ServiceProvider $service_provider = $swift::params::service_provider ) inherits swift::params { - include swift::deps swift::storage::generic { 'account': diff --git a/manifests/storage/all.pp b/manifests/storage/all.pp index 5d20deba..8cc731ac 100644 --- a/manifests/storage/all.pp +++ b/manifests/storage/all.pp @@ -140,7 +140,7 @@ # (optional) Override whether to use xinetd to manage rsync service # Defaults to swift::params::xinetd_available # -class swift::storage::all( +class swift::storage::all ( $storage_local_net_ip, $devices = '/srv/node', $object_port = 6000, @@ -176,7 +176,6 @@ class swift::storage::all( $splice = false, $rsync_use_xinetd = $swift::params::xinetd_available, ) inherits swift::params { - include swift::deps if ("${$object_port}" == '6000') { diff --git a/manifests/storage/container.pp b/manifests/storage/container.pp index 1935c06b..4b9caea0 100644 --- a/manifests/storage/container.pp +++ b/manifests/storage/container.pp @@ -31,7 +31,7 @@ # See README for more details. # Defaults to $swift::params::service_provider. # -class swift::storage::container( +class swift::storage::container ( Boolean $manage_service = true, Boolean $enabled = true, $package_ensure = 'present', @@ -39,7 +39,6 @@ class swift::storage::container( String[1] $config_file_name = 'container-server.conf', Swift::ServiceProvider $service_provider = $swift::params::service_provider ) inherits swift::params { - include swift::deps swift::storage::generic { 'container': diff --git a/manifests/storage/cron/recon.pp b/manifests/storage/cron/recon.pp index 0991fcd1..ef2d761c 100644 --- a/manifests/storage/cron/recon.pp +++ b/manifests/storage/cron/recon.pp @@ -44,7 +44,7 @@ # Defaults to 'swift'. # -class swift::storage::cron::recon( +class swift::storage::cron::recon ( $minute = '*/5', $hour = '*', $monthday = '*', @@ -53,7 +53,6 @@ class swift::storage::cron::recon( $configfile = '/etc/swift/object-server.conf', $user = $swift::params::user ) inherits swift::params { - include swift::deps cron { 'swift-recon-cron': diff --git a/manifests/storage/disk.pp b/manifests/storage/disk.pp index da509ecf..611e2a5a 100644 --- a/manifests/storage/disk.pp +++ b/manifests/storage/disk.pp @@ -73,7 +73,7 @@ # # TODO(yuxcer): maybe we can remove param $base_dir # -define swift::storage::disk( +define swift::storage::disk ( Stdlib::Absolutepath $base_dir = '/dev', Stdlib::Absolutepath $mnt_base_dir = '/srv/node', $byte_size = '1024', @@ -84,7 +84,6 @@ define swift::storage::disk( Boolean $manage_filesystem = true, String[1] $label = $name, ) { - include swift::deps include swift::params @@ -113,14 +112,15 @@ define swift::storage::disk( } } - create_resources("swift::storage::${filesystem_type}", { $name => { - 'device' => "${base_dir}/${name}", - 'mnt_base_dir' => $mnt_base_dir, - 'byte_size' => $byte_size, - 'loopback' => false, - 'mount_type' => $mount_type, - 'manage_filesystem' => $manage_filesystem, - 'label' => $label, - }}) - + create_resources("swift::storage::${filesystem_type}", { + $name => { + 'device' => "${base_dir}/${name}", + 'mnt_base_dir' => $mnt_base_dir, + 'byte_size' => $byte_size, + 'loopback' => false, + 'mount_type' => $mount_type, + 'manage_filesystem' => $manage_filesystem, + 'label' => $label, + }, + }) } diff --git a/manifests/storage/disks.pp b/manifests/storage/disks.pp index 713e6c6e..a8ac3b32 100644 --- a/manifests/storage/disks.pp +++ b/manifests/storage/disks.pp @@ -24,6 +24,9 @@ # [*defaults*] A config hash # Optional. Defaults to a empty hash # -class swift::storage::disks($args = {}, $defaults = {}) { +class swift::storage::disks ( + $args = {}, + $defaults = {} +) { create_resources(swift::storage::disk, $args, $defaults) } diff --git a/manifests/storage/drive_audit.pp b/manifests/storage/drive_audit.pp index de60a080..66ec5ee6 100644 --- a/manifests/storage/drive_audit.pp +++ b/manifests/storage/drive_audit.pp @@ -100,7 +100,7 @@ # audit config. # Defaults to false. # -class swift::storage::drive_audit( +class swift::storage::drive_audit ( # cron options $user = $swift::params::user, $minute = 1, @@ -128,7 +128,6 @@ class swift::storage::drive_audit( Hash[String[1], String[1]] $regex_pattern = {}, Boolean $purge_config = false, ) inherits swift::params { - include swift::deps resources { 'swift_drive_audit_config': @@ -145,7 +144,6 @@ class swift::storage::drive_audit( } File['/etc/swift/drive-audit.conf'] -> Swift_drive_audit_config<||> - swift_drive_audit_config { 'drive-audit/log_name' : value => $log_name; 'drive-audit/log_facility' : value => $log_facility; diff --git a/manifests/storage/ext4.pp b/manifests/storage/ext4.pp index 35fd3515..1b03862d 100644 --- a/manifests/storage/ext4.pp +++ b/manifests/storage/ext4.pp @@ -34,7 +34,7 @@ # (optional) Filesystem label. # Defaults to $name. # -define swift::storage::ext4( +define swift::storage::ext4 ( Stdlib::Absolutepath $device = "/dev/${name}", $byte_size = '1024', Stdlib::Absolutepath $mnt_base_dir = '/srv/node', @@ -43,7 +43,6 @@ define swift::storage::ext4( Boolean $manage_filesystem = true, String[1] $label = $name, ) { - include swift::deps case $mount_type { diff --git a/manifests/storage/filter/backend_ratelimit.pp b/manifests/storage/filter/backend_ratelimit.pp index 22d1f267..97dd19d0 100644 --- a/manifests/storage/filter/backend_ratelimit.pp +++ b/manifests/storage/filter/backend_ratelimit.pp @@ -60,7 +60,7 @@ # # Copyright 2022 Red Hat, unless otherwise noted. # -define swift::storage::filter::backend_ratelimit( +define swift::storage::filter::backend_ratelimit ( $requests_per_device_per_second = $facts['os_service_default'], $delete_requests_per_device_per_second = $facts['os_service_default'], $get_requests_per_device_per_second = $facts['os_service_default'], @@ -71,7 +71,6 @@ define swift::storage::filter::backend_ratelimit( $update_requests_per_device_per_second = $facts['os_service_default'], $requests_per_device_rate_buffer = $facts['os_service_default'], ) { - include swift::deps $config_type = "swift_${name}_config" @@ -108,5 +107,4 @@ define swift::storage::filter::backend_ratelimit( 'value' => $requests_per_device_rate_buffer, } }) - } diff --git a/manifests/storage/filter/healthcheck.pp b/manifests/storage/filter/healthcheck.pp index 161f533f..ad85d476 100644 --- a/manifests/storage/filter/healthcheck.pp +++ b/manifests/storage/filter/healthcheck.pp @@ -3,14 +3,12 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -define swift::storage::filter::healthcheck( -) { - +define swift::storage::filter::healthcheck { include swift::deps $config_type = "swift_${name}_config" create_resources($config_type, { - 'filter:healthcheck/use' => {'value' => 'egg:swift#healthcheck'}, + 'filter:healthcheck/use' => { 'value' => 'egg:swift#healthcheck' }, }) } diff --git a/manifests/storage/filter/recon.pp b/manifests/storage/filter/recon.pp index 89e47404..49ddfa31 100644 --- a/manifests/storage/filter/recon.pp +++ b/manifests/storage/filter/recon.pp @@ -19,17 +19,15 @@ # # Copyright 2011 Puppetlabs Inc, unless otherwise noted. # -define swift::storage::filter::recon( +define swift::storage::filter::recon ( $cache_path = $facts['os_service_default'], ) { - include swift::deps $config_type = "swift_${name}_config" create_resources($config_type, { - 'filter:recon/use' => {'value' => 'egg:swift#recon'}, - 'filter:recon/recon_cache_path' => {'value' => $cache_path}, + 'filter:recon/use' => { 'value' => 'egg:swift#recon' }, + 'filter:recon/recon_cache_path' => { 'value' => $cache_path }, }) - } diff --git a/manifests/storage/generic.pp b/manifests/storage/generic.pp index dd0c92a1..c0af74c9 100644 --- a/manifests/storage/generic.pp +++ b/manifests/storage/generic.pp @@ -33,7 +33,7 @@ # == Dependencies # Requires Class[swift::storage] # -define swift::storage::generic( +define swift::storage::generic ( Swift::StorageServerType $type = $name, Boolean $manage_service = true, Boolean $enabled = true, @@ -41,7 +41,6 @@ define swift::storage::generic( String[1] $config_file_name = "${name}-server.conf", Swift::ServiceProvider $service_provider = $swift::params::service_provider ) { - include swift::deps include swift::params diff --git a/manifests/storage/loopback.pp b/manifests/storage/loopback.pp index f4b2102d..8e4cc317 100644 --- a/manifests/storage/loopback.pp +++ b/manifests/storage/loopback.pp @@ -30,14 +30,13 @@ # (optional) The filesystem type. # Defaults to 'xfs'. # -define swift::storage::loopback( +define swift::storage::loopback ( $base_dir = '/srv/loopback-device', $mnt_base_dir = '/srv/node', $byte_size = '1024', $seek = '25000', $fstype = 'xfs' ) { - include swift::deps include swift::params diff --git a/manifests/storage/loopbacks.pp b/manifests/storage/loopbacks.pp index 39a2e5cc..de2ca49c 100644 --- a/manifests/storage/loopbacks.pp +++ b/manifests/storage/loopbacks.pp @@ -24,6 +24,9 @@ # [*defaults*] A config hash # Optional. Defaults to a empty hash # -class swift::storage::loopbacks($args = {}, $defaults = {}) { +class swift::storage::loopbacks ( + $args = {}, + $defaults = {}, +) { create_resources(swift::storage::loopback, $args, $defaults) } diff --git a/manifests/storage/mount.pp b/manifests/storage/mount.pp index e36b16e5..02b5f08a 100644 --- a/manifests/storage/mount.pp +++ b/manifests/storage/mount.pp @@ -18,23 +18,22 @@ # (optional) The filesystem type. # Defaults to 'xfs'. # -define swift::storage::mount( +define swift::storage::mount ( Swift::MountDevice $device = "/dev/${name}", Stdlib::Absolutepath $mnt_base_dir = '/srv/node', Boolean $loopback = false, String[1] $fstype = 'xfs' ) { - include swift::deps include swift::params - if($loopback){ + if $loopback { $options = 'noatime,nodiratime,nofail,loop' } else { $options = 'noatime,nodiratime,nofail' } - if($fstype == 'xfs'){ + if $fstype == 'xfs' { $fsoptions = 'logbufs=8' } else { $fsoptions = 'user_xattr' diff --git a/manifests/storage/node.pp b/manifests/storage/node.pp index 866458b3..a6141d75 100644 --- a/manifests/storage/node.pp +++ b/manifests/storage/node.pp @@ -41,7 +41,7 @@ # [*policy_index*] # (optional) storage policy index # Defaults to undef -define swift::storage::node( +define swift::storage::node ( $mnt_base_dir, Variant[Integer, Pattern[/^\d+$/]] $zone, $weight = 1, @@ -51,7 +51,6 @@ define swift::storage::node( $storage_local_net_ip = '127.0.0.1', $policy_index = undef, ) { - include swift::deps Swift::Storage::Server { @@ -94,5 +93,4 @@ define swift::storage::node( zone => $zone, weight => $weight, } - } diff --git a/manifests/storage/object.pp b/manifests/storage/object.pp index 8db6ceef..0fde49ba 100644 --- a/manifests/storage/object.pp +++ b/manifests/storage/object.pp @@ -26,14 +26,13 @@ # See README for more details. # Defaults to $swift::params::service_provider. # -class swift::storage::object( +class swift::storage::object ( Boolean $manage_service = true, Boolean $enabled = true, $package_ensure = 'present', String[1] $config_file_name = 'object-server.conf', Swift::ServiceProvider $service_provider = $swift::params::service_provider ) inherits swift::params { - include swift::deps swift::storage::generic { 'object': diff --git a/manifests/storage/policy.pp b/manifests/storage/policy.pp index d985137b..989b22b1 100644 --- a/manifests/storage/policy.pp +++ b/manifests/storage/policy.pp @@ -1,4 +1,4 @@ -# Class swift::storage::policy +# Define swift::storage::policy # # Setting any optional parameter to undef will remove it # from the storage policy defined in swift.conf. @@ -57,7 +57,7 @@ # feeding a segment into the encoder/decoder in bytes. # Defaults to undef # -define swift::storage::policy( +define swift::storage::policy ( $policy_name, $default_policy, $ensure = 'present', @@ -70,7 +70,6 @@ define swift::storage::policy( $ec_num_parity_fragments = undef, $ec_object_segment_size = undef, ) { - include swift::deps Swift_storage_policy<| |> ~> Service<| tag == 'swift-service' |> @@ -95,5 +94,4 @@ define swift::storage::policy( ec_num_parity_fragments => $ec_num_parity_fragments, ec_object_segment_size => $ec_object_segment_size, } - } diff --git a/manifests/storage/server.pp b/manifests/storage/server.pp index 2069b8bb..1dbe51e5 100644 --- a/manifests/storage/server.pp +++ b/manifests/storage/server.pp @@ -291,7 +291,7 @@ # in the config file. # Defaults to false. # -define swift::storage::server( +define swift::storage::server ( Swift::StorageServerType $type, $storage_local_net_ip, Pattern[/^\d+$/] $bind_port = $name, @@ -361,8 +361,7 @@ define swift::storage::server( $container_sharder_conn_timeout = $facts['os_service_default'], $container_sharder_node_timeout = $facts['os_service_default'], Boolean $purge_config = false, -){ - +) { include swift::deps include swift::params @@ -437,39 +436,39 @@ define swift::storage::server( # common settings $common_opts = { - 'DEFAULT/devices' => {'value' => $devices}, - 'DEFAULT/bind_ip' => {'value' => $storage_local_net_ip}, - 'DEFAULT/bind_port' => {'value' => $bind_port}, - 'DEFAULT/mount_check' => {'value' => $mount_check}, - 'DEFAULT/disable_fallocate' => {'value' => $disable_fallocate}, - 'DEFAULT/fallocate_reserve' => {'value' => $fallocate_reserve}, - 'DEFAULT/user' => {'value' => $user_real}, - 'DEFAULT/workers' => {'value' => $workers}, - 'DEFAULT/conn_timeout' => {'value' => $conn_timeout}, - 'DEFAULT/node_timeout' => {'value' => $node_timeout}, - 'DEFAULT/log_name' => {'value' => $log_name}, - 'DEFAULT/log_facility' => {'value' => $log_facility}, - 'DEFAULT/log_level' => {'value' => $log_level}, - 'DEFAULT/log_address' => {'value' => $log_address}, - 'DEFAULT/log_udp_host' => {'value' => $log_udp_host}, - 'DEFAULT/log_udp_port' => {'value' => $log_udp_port}, - 'DEFAULT/log_max_line_length' => {'value' => $log_max_line_length}, + 'DEFAULT/devices' => { 'value' => $devices }, + 'DEFAULT/bind_ip' => { 'value' => $storage_local_net_ip }, + 'DEFAULT/bind_port' => { 'value' => $bind_port }, + 'DEFAULT/mount_check' => { 'value' => $mount_check }, + 'DEFAULT/disable_fallocate' => { 'value' => $disable_fallocate }, + 'DEFAULT/fallocate_reserve' => { 'value' => $fallocate_reserve }, + 'DEFAULT/user' => { 'value' => $user_real }, + 'DEFAULT/workers' => { 'value' => $workers }, + 'DEFAULT/conn_timeout' => { 'value' => $conn_timeout }, + 'DEFAULT/node_timeout' => { 'value' => $node_timeout }, + 'DEFAULT/log_name' => { 'value' => $log_name }, + 'DEFAULT/log_facility' => { 'value' => $log_facility }, + 'DEFAULT/log_level' => { 'value' => $log_level }, + 'DEFAULT/log_address' => { 'value' => $log_address }, + 'DEFAULT/log_udp_host' => { 'value' => $log_udp_host }, + 'DEFAULT/log_udp_port' => { 'value' => $log_udp_port }, + 'DEFAULT/log_max_line_length' => { 'value' => $log_max_line_length }, # pipeline - 'pipeline:main/pipeline' => {'value' => join($pipeline, ' ')}, + 'pipeline:main/pipeline' => { 'value' => join($pipeline, ' ') }, # server - "app:${type}-server/use" => {'value' => "egg:swift#${type}"}, - "app:${type}-server/set log_name" => {'value' => $log_name}, - "app:${type}-server/set log_facility" => {'value' => $log_facility}, - "app:${type}-server/set log_level" => {'value' => $log_level}, - "app:${type}-server/set log_requests" => {'value' => $log_requests}, - "app:${type}-server/set log_address" => {'value' => $log_address}, - "app:${type}-server/fallocate_reserve" => {'value' => $server_fallocate_reserve}, - "app:${type}-server/stale_worker_timeout" => {'value' => $stale_worker_timeout}, + "app:${type}-server/use" => { 'value' => "egg:swift#${type}" }, + "app:${type}-server/set log_name" => { 'value' => $log_name }, + "app:${type}-server/set log_facility" => { 'value' => $log_facility }, + "app:${type}-server/set log_level" => { 'value' => $log_level }, + "app:${type}-server/set log_requests" => { 'value' => $log_requests }, + "app:${type}-server/set log_address" => { 'value' => $log_address }, + "app:${type}-server/fallocate_reserve" => { 'value' => $server_fallocate_reserve }, + "app:${type}-server/stale_worker_timeout" => { 'value' => $stale_worker_timeout }, # auditor - "${type}-auditor/" => {'ensure' => present}, + "${type}-auditor/" => { 'ensure' => present }, # replicator - "${type}-replicator/" => {'ensure' => present}, - "${type}-replicator/rsync_module" => {'value' => $rsync_module}, + "${type}-replicator/" => { 'ensure' => present }, + "${type}-replicator/rsync_module" => { 'value' => $rsync_module }, } Anchor['swift::config::begin'] @@ -479,98 +478,98 @@ define swift::storage::server( # statsd if $statsd_enabled { $log_statsd_opts = { - 'DEFAULT/log_statsd_host' => {'value' => $log_statsd_host}, - 'DEFAULT/log_statsd_port' => {'value' => $log_statsd_port}, - 'DEFAULT/log_statsd_default_sample_rate' => {'value' => $log_statsd_default_sample_rate}, - 'DEFAULT/log_statsd_sample_rate_factor' => {'value' => $log_statsd_sample_rate_factor}, - 'DEFAULT/log_statsd_metric_prefix' => {'value' => $log_statsd_metric_prefix}, + 'DEFAULT/log_statsd_host' => { 'value' => $log_statsd_host }, + 'DEFAULT/log_statsd_port' => { 'value' => $log_statsd_port }, + 'DEFAULT/log_statsd_default_sample_rate' => { 'value' => $log_statsd_default_sample_rate }, + 'DEFAULT/log_statsd_sample_rate_factor' => { 'value' => $log_statsd_sample_rate_factor }, + 'DEFAULT/log_statsd_metric_prefix' => { 'value' => $log_statsd_metric_prefix }, } } else { $log_statsd_opts = { - 'DEFAULT/log_statsd_host' => {'value' => $facts['os_service_default']}, - 'DEFAULT/log_statsd_port' => {'value' => $facts['os_service_default']}, - 'DEFAULT/log_statsd_default_sample_rate' => {'value' => $facts['os_service_default']}, - 'DEFAULT/log_statsd_sample_rate_factor' => {'value' => $facts['os_service_default']}, - 'DEFAULT/log_statsd_metric_prefix' => {'value' => $facts['os_service_default']}, + 'DEFAULT/log_statsd_host' => { 'value' => $facts['os_service_default'] }, + 'DEFAULT/log_statsd_port' => { 'value' => $facts['os_service_default'] }, + 'DEFAULT/log_statsd_default_sample_rate' => { 'value' => $facts['os_service_default'] }, + 'DEFAULT/log_statsd_sample_rate_factor' => { 'value' => $facts['os_service_default'] }, + 'DEFAULT/log_statsd_metric_prefix' => { 'value' => $facts['os_service_default'] }, } } case $type { 'account': { $type_opts = { - 'DEFAULT/db_preallocation' => {'value' => $db_preallocation}, + 'DEFAULT/db_preallocation' => { 'value' => $db_preallocation }, # account-server # account-auditor # account-replicator - 'account-replicator/concurrency' => {'value' => $replicator_concurrency}, - 'account-replicator/interval' => {'value' => $replicator_interval}, - 'account-replicator/conn_timeout' => {'value' => $replicator_conn_timeout}, - 'account-replicator/node_timeout' => {'value' => $replicator_node_timeout}, + 'account-replicator/concurrency' => { 'value' => $replicator_concurrency }, + 'account-replicator/interval' => { 'value' => $replicator_interval }, + 'account-replicator/conn_timeout' => { 'value' => $replicator_conn_timeout }, + 'account-replicator/node_timeout' => { 'value' => $replicator_node_timeout }, # account-reaper - 'account-reaper/' => {'ensure' => present}, - 'account-reaper/concurrency' => {'value' => $reaper_concurrency}, - 'account-reaper/interval' => {'value' => $reaper_interval}, - 'account-reaper/conn_timeout' => {'value' => $reaper_conn_timeout}, - 'account-reaper/node_timeout' => {'value' => $reaper_node_timeout}, + 'account-reaper/' => { 'ensure' => present }, + 'account-reaper/concurrency' => { 'value' => $reaper_concurrency }, + 'account-reaper/interval' => { 'value' => $reaper_interval }, + 'account-reaper/conn_timeout' => { 'value' => $reaper_conn_timeout }, + 'account-reaper/node_timeout' => { 'value' => $reaper_node_timeout }, } if $log_name_per_daemon { $log_name_opts = { - 'account-auditor/log_name' => {'value' => 'account-auditor'}, - 'account-replicator/log_name' => {'value' => 'account-replicator'}, - 'account-reaper/log_name' => {'value' => 'account-reaper'}, + 'account-auditor/log_name' => { 'value' => 'account-auditor' }, + 'account-replicator/log_name' => { 'value' => 'account-replicator' }, + 'account-reaper/log_name' => { 'value' => 'account-reaper' }, } } else { $log_name_opts = { - 'account-auditor/log_name' => {'ensure' => absent}, - 'account-replicator/log_name' => {'ensure' => absent}, - 'account-reaper/log_name' => {'ensure' => absent}, + 'account-auditor/log_name' => { 'ensure' => absent }, + 'account-replicator/log_name' => { 'ensure' => absent }, + 'account-reaper/log_name' => { 'ensure' => absent }, } } } 'container': { $type_opts = { - 'DEFAULT/db_preallocation' => {'value' => $db_preallocation}, - 'DEFAULT/allowed_sync_hosts' => {'value' => join($swift::storage::container::allowed_sync_hosts, ',')}, + 'DEFAULT/db_preallocation' => { 'value' => $db_preallocation }, + 'DEFAULT/allowed_sync_hosts' => { 'value' => join($swift::storage::container::allowed_sync_hosts, ',') }, # container-server # container-auditor # container-replicator - 'container-replicator/concurrency' => {'value' => $replicator_concurrency}, - 'container-replicator/interval' => {'value' => $replicator_interval}, - 'container-replicator/conn_timeout' => {'value' => $replicator_conn_timeout}, - 'container-replicator/node_timeout' => {'value' => $replicator_node_timeout}, + 'container-replicator/concurrency' => { 'value' => $replicator_concurrency }, + 'container-replicator/interval' => { 'value' => $replicator_interval }, + 'container-replicator/conn_timeout' => { 'value' => $replicator_conn_timeout }, + 'container-replicator/node_timeout' => { 'value' => $replicator_node_timeout }, # container-updater - 'container-updater/' => {'ensure' => present}, - 'container-updater/concurrency' => {'value' => $updater_concurrency}, - 'container-updater/interval' => {'value' => $updater_interval}, - 'container-updater/conn_timeout' => {'value' => $updater_conn_timeout}, - 'container-updater/node_timeout' => {'value' => $updater_node_timeout}, + 'container-updater/' => { 'ensure' => present }, + 'container-updater/concurrency' => { 'value' => $updater_concurrency }, + 'container-updater/interval' => { 'value' => $updater_interval }, + 'container-updater/conn_timeout' => { 'value' => $updater_conn_timeout }, + 'container-updater/node_timeout' => { 'value' => $updater_node_timeout }, # container-sync - 'container-sync/' => {'ensure' => present}, + 'container-sync/' => { 'ensure' => present }, # container-sharder - 'container-sharder/' => {'ensure' => present}, - 'container-sharder/auto_shard' => {'value' => $container_sharder_auto_shard}, - 'container-sharder/concurrency' => {'value' => $container_sharder_concurrency}, - 'container-sharder/interval' => {'value' => $container_sharder_interval}, - 'container-sharder/conn_timeout' => {'value' => $container_sharder_conn_timeout}, - 'container-sharder/node_timeout' => {'value' => $container_sharder_node_timeout}, + 'container-sharder/' => { 'ensure' => present }, + 'container-sharder/auto_shard' => { 'value' => $container_sharder_auto_shard }, + 'container-sharder/concurrency' => { 'value' => $container_sharder_concurrency }, + 'container-sharder/interval' => { 'value' => $container_sharder_interval }, + 'container-sharder/conn_timeout' => { 'value' => $container_sharder_conn_timeout }, + 'container-sharder/node_timeout' => { 'value' => $container_sharder_node_timeout }, } if $log_name_per_daemon { $log_name_opts = { - 'container-auditor/log_name' => {'value' => 'container-auditor'}, - 'container-replicator/log_name' => {'value' => 'container-replicator'}, - 'container-updater/log_name' => {'value' => 'container-updater'}, - 'container-sync/log_name' => {'value' => 'container-sync'}, - 'container-sharder/log_name' => {'value' => 'container-sharder'}, + 'container-auditor/log_name' => { 'value' => 'container-auditor' }, + 'container-replicator/log_name' => { 'value' => 'container-replicator' }, + 'container-updater/log_name' => { 'value' => 'container-updater' }, + 'container-sync/log_name' => { 'value' => 'container-sync' }, + 'container-sharder/log_name' => { 'value' => 'container-sharder' }, } } else { $log_name_opts = { - 'container-auditor/log_name' => {'ensure' => absent}, - 'container-replicator/log_name' => {'ensure' => absent}, - 'container-updater/log_name' => {'ensure' => absent}, - 'container-sync/log_name' => {'ensure' => absent}, - 'container-sharder/log_name' => {'ensure' => absent}, + 'container-auditor/log_name' => { 'ensure' => absent }, + 'container-replicator/log_name' => { 'ensure' => absent }, + 'container-updater/log_name' => { 'ensure' => absent }, + 'container-sync/log_name' => { 'ensure' => absent }, + 'container-sharder/log_name' => { 'ensure' => absent }, } } @@ -586,48 +585,48 @@ define swift::storage::server( } 'object': { $type_opts = { - 'DEFAULT/servers_per_port' => {'value' => $servers_per_port}, - 'DEFAULT/network_chunk_size' => {'value' => $network_chunk_size}, - 'DEFAULT/disk_chunk_size' => {'value' => $disk_chunk_size}, - 'DEFAULT/client_timeout' => {'value' => $client_timeout}, + 'DEFAULT/servers_per_port' => { 'value' => $servers_per_port }, + 'DEFAULT/network_chunk_size' => { 'value' => $network_chunk_size }, + 'DEFAULT/disk_chunk_size' => { 'value' => $disk_chunk_size }, + 'DEFAULT/client_timeout' => { 'value' => $client_timeout }, # object-server - 'app:object-server/splice' => {'value' => $splice}, - 'app:object-server/mb_per_sync' => {'value' => $object_server_mb_per_sync}, + 'app:object-server/splice' => { 'value' => $splice }, + 'app:object-server/mb_per_sync' => { 'value' => $object_server_mb_per_sync }, # object-auditor - 'object-auditor/disk_chunk_size' => {'value' => $auditor_disk_chunk_size}, + 'object-auditor/disk_chunk_size' => { 'value' => $auditor_disk_chunk_size }, # object-replicator - 'object-replicator/concurrency' => {'value' => $replicator_concurrency}, - 'object-replicator/conn_timeout' => {'value' => $replicator_conn_timeout}, - 'object-replicator/node_timeout' => {'value' => $replicator_node_timeout}, - 'object-replicator/rsync_timeout' => {'value' => $rsync_timeout}, - 'object-replicator/rsync_bwlimit' => {'value' => $rsync_bwlimit}, + 'object-replicator/concurrency' => { 'value' => $replicator_concurrency }, + 'object-replicator/conn_timeout' => { 'value' => $replicator_conn_timeout }, + 'object-replicator/node_timeout' => { 'value' => $replicator_node_timeout }, + 'object-replicator/rsync_timeout' => { 'value' => $rsync_timeout }, + 'object-replicator/rsync_bwlimit' => { 'value' => $rsync_bwlimit }, # object-updater - 'object-updater/' => {'ensure' => present}, - 'object-updater/concurrency' => {'value' => $updater_concurrency}, - 'object-updater/interval' => {'value' => $updater_interval}, - 'object-updater/conn_timeout' => {'value' => $updater_conn_timeout}, - 'object-updater/node_timeout' => {'value' => $updater_node_timeout}, + 'object-updater/' => { 'ensure' => present }, + 'object-updater/concurrency' => { 'value' => $updater_concurrency }, + 'object-updater/interval' => { 'value' => $updater_interval }, + 'object-updater/conn_timeout' => { 'value' => $updater_conn_timeout }, + 'object-updater/node_timeout' => { 'value' => $updater_node_timeout }, # object-reconstructor - 'object-reconstructor/' => {'ensure' => present}, + 'object-reconstructor/' => { 'ensure' => present }, # object-relinker - 'object-relinker/' => {'ensure' => present}, + 'object-relinker/' => { 'ensure' => present }, } if $log_name_per_daemon { $log_name_opts = { - 'object-auditor/log_name' => {'value' => 'object-auditor'}, - 'object-replicator/log_name' => {'value' => 'object-replicator'}, - 'object-updater/log_name' => {'value' => 'object-updater'}, - 'object-reconstructor/log_name' => {'value' => 'object-reconstructor'}, - 'object-relinker/log_name' => {'value' => 'object-relinker'}, + 'object-auditor/log_name' => { 'value' => 'object-auditor' }, + 'object-replicator/log_name' => { 'value' => 'object-replicator' }, + 'object-updater/log_name' => { 'value' => 'object-updater' }, + 'object-reconstructor/log_name' => { 'value' => 'object-reconstructor' }, + 'object-relinker/log_name' => { 'value' => 'object-relinker' }, } } else { $log_name_opts = { - 'object-auditor/log_name' => {'ensure' => absent}, - 'object-replicator/log_name' => {'ensure' => absent}, - 'object-updater/log_name' => {'ensure' => absent}, - 'object-reconstructor/log_name' => {'ensure' => absent}, - 'object-relinker/log_name' => {'ensure' => absent}, + 'object-auditor/log_name' => { 'ensure' => absent }, + 'object-replicator/log_name' => { 'ensure' => absent }, + 'object-updater/log_name' => { 'ensure' => absent }, + 'object-reconstructor/log_name' => { 'ensure' => absent }, + 'object-relinker/log_name' => { 'ensure' => absent }, } } } diff --git a/manifests/storage/xfs.pp b/manifests/storage/xfs.pp index 25795741..9c6920b0 100644 --- a/manifests/storage/xfs.pp +++ b/manifests/storage/xfs.pp @@ -47,7 +47,7 @@ # Creates /srv/node if dir does not exist, formats sdbX with XFS unless # it already has an XFS FS, and mounts de FS in /srv/node/sdX # -define swift::storage::xfs( +define swift::storage::xfs ( Stdlib::Absolutepath $device = "/dev/${name}", $byte_size = '1024', Stdlib::Absolutepath $mnt_base_dir = '/srv/node', @@ -56,7 +56,6 @@ define swift::storage::xfs( Boolean $manage_filesystem = true, String[1] $label = $name, ) { - include swift::deps include swift::params include swift::xfs @@ -81,7 +80,7 @@ define swift::storage::xfs( } } - if(!defined(File[$mnt_base_dir])) { + if !defined(File[$mnt_base_dir]) { file { $mnt_base_dir: ensure => directory, owner => 'root', diff --git a/manifests/wsgi/uwsgi_account.pp b/manifests/wsgi/uwsgi_account.pp index 1479b6fb..e3e2e995 100644 --- a/manifests/wsgi/uwsgi_account.pp +++ b/manifests/wsgi/uwsgi_account.pp @@ -20,11 +20,10 @@ class swift::wsgi::uwsgi_account ( $processes = $facts['os_workers'], $listen_queue_size = 100, -){ - +) { include swift::deps - if $facts['os']['name'] != 'Debian'{ + if $facts['os']['name'] != 'Debian' { warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.') } diff --git a/manifests/wsgi/uwsgi_container.pp b/manifests/wsgi/uwsgi_container.pp index 52d4a8fa..04151e4a 100644 --- a/manifests/wsgi/uwsgi_container.pp +++ b/manifests/wsgi/uwsgi_container.pp @@ -20,11 +20,10 @@ class swift::wsgi::uwsgi_container ( $processes = $facts['os_workers'], $listen_queue_size = 100, -){ - +) { include swift::deps - if $facts['os']['name'] != 'Debian'{ + if $facts['os']['name'] != 'Debian' { warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.') } diff --git a/manifests/wsgi/uwsgi_proxy.pp b/manifests/wsgi/uwsgi_proxy.pp index 22625733..cf2616aa 100644 --- a/manifests/wsgi/uwsgi_proxy.pp +++ b/manifests/wsgi/uwsgi_proxy.pp @@ -20,11 +20,10 @@ class swift::wsgi::uwsgi_proxy ( $processes = $facts['os_workers'], $listen_queue_size = 100, -){ - +) { include swift::deps - if $facts['os']['name'] != 'Debian'{ + if $facts['os']['name'] != 'Debian' { warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.') } diff --git a/manifests/xfs.pp b/manifests/xfs.pp index 83714b49..7d262eb6 100644 --- a/manifests/xfs.pp +++ b/manifests/xfs.pp @@ -2,10 +2,8 @@ # package dependencies for creating # xfs partitions class swift::xfs { - include swift::deps $packages = ['xfsprogs', 'parted'] stdlib::ensure_packages($packages) - }