Install packages before ensuring container-sync-realms.conf

... otherwise the resource may fail due to missing /etc/swift .

Also remove the swift-config-file tag which is not really used.

Change-Id: I867eb934c81c72ab729c29a4527a5c0bab20026b
This commit is contained in:
Takashi Kajinami 2025-03-09 01:43:31 +09:00
parent fb53f21702
commit 5fc89ad787
2 changed files with 6 additions and 10 deletions

View File

@ -428,7 +428,6 @@ define swift::storage::server(
owner => 'root',
group => pick($group, $::swift::params::group),
mode => '0640',
tag => 'swift-config-file',
before => $required_middlewares,
}
@ -576,11 +575,12 @@ define swift::storage::server(
}
file { '/etc/swift/container-sync-realms.conf':
ensure => 'file',
owner => 'root',
group => pick($group, $::swift::params::group),
mode => '0640',
tag => 'swift-config-file',
ensure => 'file',
owner => 'root',
group => pick($group, $::swift::params::group),
mode => '0640',
require => Anchor['swift::config::begin'],
before => Anchor['swift::config::end']
}
File['/etc/swift/container-sync-realms.conf'] -> Swift_container_sync_realms_config<||>
}

View File

@ -62,7 +62,6 @@ describe 'swift::storage::server' do
:owner => 'root',
:group => 'swift',
:mode => '0640',
:tag => 'swift-config-file'
)}
it {
@ -248,14 +247,12 @@ describe 'swift::storage::server' do
:owner => 'root',
:group => 'swift',
:mode => '0640',
:tag => 'swift-config-file'
)}
it { is_expected.to contain_file('/etc/swift/container-sync-realms.conf').with(
:ensure => 'file',
:owner => 'root',
:group => 'swift',
:mode => '0640',
:tag => 'swift-config-file'
)}
it {
@ -452,7 +449,6 @@ describe 'swift::storage::server' do
:owner => 'root',
:group => 'swift',
:mode => '0640',
:tag => 'swift-config-file'
)}
it {