From 0098067226a9a1593bba49231eaa96c79aec8a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Gagne=CC=81?= Date: Sun, 25 Aug 2013 23:29:34 -0400 Subject: [PATCH] Fix puppet-lint warnings about ensure Fix warning: "ensure found on line but it's not the first attribute" Change-Id: Iecc0cd4fe267c40fbef9a84ff1da2eaff5aa45a7 --- manifests/init.pp | 4 ++-- manifests/proxy.pp | 4 ++-- manifests/proxy/swift3.pp | 2 +- manifests/storage/account.pp | 4 ++-- manifests/storage/container.pp | 4 ++-- manifests/storage/disk.pp | 2 +- manifests/storage/generic.pp | 6 +++--- manifests/storage/loopback.pp | 2 +- manifests/storage/object.pp | 4 ++-- manifests/storage/xfs.pp | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index cd905673..0075b9e8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -31,14 +31,14 @@ class swift( if !defined(Package['swift']) { package { 'swift': - name => $::swift::params::package_name, ensure => $package_ensure, + name => $::swift::params::package_name, } } package { 'swiftclient': - name => $::swift::params::client_package, ensure => $package_ensure, + name => $::swift::params::client_package, } File { owner => 'swift', group => 'swift', require => Package['swift'] } diff --git a/manifests/proxy.pp b/manifests/proxy.pp index 5417d512..1919f38b 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -81,8 +81,8 @@ class swift::proxy( } package { 'swift-proxy': - name => $::swift::params::proxy_package_name, ensure => $package_ensure, + name => $::swift::params::proxy_package_name, } concat { '/etc/swift/proxy-server.conf': @@ -113,8 +113,8 @@ class swift::proxy( } service { 'swift-proxy': - name => $::swift::params::proxy_service_name, ensure => running, + name => $::swift::params::proxy_service_name, enable => true, provider => $::swift::params::service_provider, hasstatus => true, diff --git a/manifests/proxy/swift3.pp b/manifests/proxy/swift3.pp index 49fd9736..4396d6f3 100644 --- a/manifests/proxy/swift3.pp +++ b/manifests/proxy/swift3.pp @@ -21,8 +21,8 @@ class swift::proxy::swift3( include swift::params package { 'swift-plugin-s3': - name => $::swift::params::swift3, ensure => $ensure, + name => $::swift::params::swift3, } concat::fragment { 'swift_swift3': diff --git a/manifests/storage/account.pp b/manifests/storage/account.pp index f181aa65..848604a1 100644 --- a/manifests/storage/account.pp +++ b/manifests/storage/account.pp @@ -6,16 +6,16 @@ class swift::storage::account( } service { 'swift-account-reaper': - name => $::swift::params::account_reaper_service_name, ensure => running, + name => $::swift::params::account_reaper_service_name, enable => true, provider => $::swift::params::service_provider, require => Package['swift-account'], } service { 'swift-account-auditor': - name => $::swift::params::account_auditor_service_name, ensure => running, + name => $::swift::params::account_auditor_service_name, enable => true, provider => $::swift::params::service_provider, require => Package['swift-account'], diff --git a/manifests/storage/container.pp b/manifests/storage/container.pp index ed78fcdd..c8fea9a9 100644 --- a/manifests/storage/container.pp +++ b/manifests/storage/container.pp @@ -13,15 +13,15 @@ class swift::storage::container( } service { 'swift-container-updater': - name => $::swift::params::container_updater_service_name, ensure => running, + name => $::swift::params::container_updater_service_name, enable => true, provider => $::swift::params::service_provider, require => Package['swift-container'], } service { 'swift-container-auditor': - name => $::swift::params::container_auditor_service_name, ensure => running, + name => $::swift::params::container_auditor_service_name, enable => true, provider => $::swift::params::service_provider, require => Package['swift-container'], diff --git a/manifests/storage/disk.pp b/manifests/storage/disk.pp index 5688cf66..c49f079a 100644 --- a/manifests/storage/disk.pp +++ b/manifests/storage/disk.pp @@ -40,9 +40,9 @@ define swift::storage::disk( if(!defined(File[$mnt_base_dir])) { file { $mnt_base_dir: + ensure => directory, owner => 'swift', group => 'swift', - ensure => directory, } } diff --git a/manifests/storage/generic.pp b/manifests/storage/generic.pp index 9f97b036..2f84f2e4 100644 --- a/manifests/storage/generic.pp +++ b/manifests/storage/generic.pp @@ -29,10 +29,10 @@ define swift::storage::generic( validate_re($name, '^object|container|account$') package { "swift-${name}": + ensure => $package_ensure, # this is a way to dynamically build the variables to lookup # sorry its so ugly :( name => inline_template("<%= scope.lookupvar('::swift::params::${name}_package_name') %>"), - ensure => $package_ensure, before => Service["swift-${name}", "swift-${name}-replicator"], } @@ -43,8 +43,8 @@ define swift::storage::generic( } service { "swift-${name}": - name => inline_template("<%= scope.lookupvar('::swift::params::${name}_service_name') %>"), ensure => running, + name => inline_template("<%= scope.lookupvar('::swift::params::${name}_service_name') %>"), enable => true, hasstatus => true, provider => $service_provider, @@ -52,8 +52,8 @@ define swift::storage::generic( } service { "swift-${name}-replicator": - name => inline_template("<%= scope.lookupvar('::swift::params::${name}_replicator_service_name') %>"), ensure => running, + name => inline_template("<%= scope.lookupvar('::swift::params::${name}_replicator_service_name') %>"), enable => true, hasstatus => true, provider => $service_provider, diff --git a/manifests/storage/loopback.pp b/manifests/storage/loopback.pp index 33558acf..323fb015 100644 --- a/manifests/storage/loopback.pp +++ b/manifests/storage/loopback.pp @@ -22,9 +22,9 @@ define swift::storage::loopback( if(!defined(File[$mnt_base_dir])) { file { $mnt_base_dir: + ensure => directory, owner => 'swift', group => 'swift', - ensure => directory, } } diff --git a/manifests/storage/object.pp b/manifests/storage/object.pp index 705edc40..b84f3596 100644 --- a/manifests/storage/object.pp +++ b/manifests/storage/object.pp @@ -6,15 +6,15 @@ class swift::storage::object( } service { 'swift-object-updater': - name => $::swift::params::object_updater_service_name, ensure => running, + name => $::swift::params::object_updater_service_name, enable => true, provider => $::swift::params::service_provider, require => Package['swift-object'], } service { 'swift-object-auditor': - name => $::swift::params::object_auditor_service_name, ensure => running, + name => $::swift::params::object_auditor_service_name, enable => true, provider => $::swift::params::service_provider, require => Package['swift-object'], diff --git a/manifests/storage/xfs.pp b/manifests/storage/xfs.pp index 084e2575..11224c50 100644 --- a/manifests/storage/xfs.pp +++ b/manifests/storage/xfs.pp @@ -32,9 +32,9 @@ define swift::storage::xfs( if(!defined(File[$mnt_base_dir])) { file { $mnt_base_dir: + ensure => directory, owner => 'swift', group => 'swift', - ensure => directory, } }