Stop managing file modes

File modes should be managed by packaging, not by Puppet.
This patch aims to stop managing File { mode => } parameters.

Partial-bug: #1458915
Change-Id: Ic38317521ac4a91bfdf234ecb4c74e4b00e3d887
This commit is contained in:
Emilien Macchi 2015-09-28 12:07:11 -04:00
parent e1ecd15f7d
commit 47ac5095b3
7 changed files with 2 additions and 12 deletions

View File

@ -88,7 +88,6 @@ class swift::dispersion (
ensure => file, ensure => file,
owner => 'swift', owner => 'swift',
group => 'swift', group => 'swift',
mode => '0660',
require => Package['swift'], require => Package['swift'],
} }

View File

@ -53,7 +53,6 @@ class swift(
file { '/etc/swift': file { '/etc/swift':
ensure => directory, ensure => directory,
mode => '2770',
} }
user {'swift': user {'swift':
ensure => present, ensure => present,
@ -67,7 +66,6 @@ class swift(
file { '/etc/swift/swift.conf': file { '/etc/swift/swift.conf':
ensure => file, ensure => file,
mode => '0660',
} }
File['/etc/swift/swift.conf'] -> Swift_config<||> File['/etc/swift/swift.conf'] -> Swift_config<||>

View File

@ -176,7 +176,6 @@ class swift::proxy(
concat { '/etc/swift/proxy-server.conf': concat { '/etc/swift/proxy-server.conf':
owner => 'swift', owner => 'swift',
group => 'swift', group => 'swift',
mode => '0660',
require => Package['swift-proxy'], require => Package['swift-proxy'],
} }

View File

@ -195,7 +195,6 @@ define swift::storage::server(
group => $group, group => $group,
notify => Service["swift-${type}", "swift-${type}-replicator"], notify => Service["swift-${type}", "swift-${type}-replicator"],
require => Package['swift'], require => Package['swift'],
mode => '0640',
} }
$required_middlewares = split( $required_middlewares = split(

View File

@ -32,7 +32,6 @@ describe 'swift::dispersion' do
:ensure => 'file', :ensure => 'file',
:owner => 'swift', :owner => 'swift',
:group => 'swift', :group => 'swift',
:mode => '0660',
:require => 'Package[swift]') :require => 'Package[swift]')
} }

View File

@ -50,7 +50,6 @@ describe 'swift::proxy' do
{:ensure => 'present', {:ensure => 'present',
:owner => 'swift', :owner => 'swift',
:group => 'swift', :group => 'swift',
:mode => '0660',
} }
)} )}

View File

@ -36,8 +36,7 @@ describe 'swift' do
end end
it {is_expected.to contain_user('swift')} it {is_expected.to contain_user('swift')}
it {is_expected.to contain_file('/etc/swift').with( it {is_expected.to contain_file('/etc/swift').with(
{:ensure => 'directory', :mode => '2770' {:ensure => 'directory'}.merge(file_defaults)
}.merge(file_defaults)
)} )}
it {is_expected.to contain_file('/var/run/swift').with( it {is_expected.to contain_file('/var/run/swift').with(
{:ensure => 'directory'}.merge(file_defaults) {:ensure => 'directory'}.merge(file_defaults)
@ -46,9 +45,7 @@ describe 'swift' do
{:ensure => 'directory'}.merge(file_defaults) {:ensure => 'directory'}.merge(file_defaults)
)} )}
it {is_expected.to contain_file('/etc/swift/swift.conf').with( it {is_expected.to contain_file('/etc/swift/swift.conf').with(
{ :ensure => 'file', {:ensure => 'file'}.merge(file_defaults)
:mode => '0660'
}.merge(file_defaults)
)} )}
it 'configures swift.conf' do it 'configures swift.conf' do
is_expected.to contain_swift_config( is_expected.to contain_swift_config(