Merge "Fix docker debug/mirrors JSON augeas changes"
This commit is contained in:
commit
e2220b6d7f
@ -173,19 +173,21 @@ class tripleo::profile::base::docker (
|
||||
|
||||
if $registry_mirror {
|
||||
$mirror_changes = [
|
||||
'set dict/entry[. = "registry-mirrors"] "registry-mirrors',
|
||||
"set dict/entry[. = \"registry-mirrors\"]/array/string \"${registry_mirror}\""
|
||||
"set dict/entry[. = 'registry-mirrors'] registry-mirrors",
|
||||
"set dict/entry[. = 'registry-mirrors']/array/string \"${registry_mirror}\""
|
||||
]
|
||||
} else {
|
||||
$mirror_changes = [ 'rm dict/entry[. = "registry-mirrors"]', ]
|
||||
$mirror_changes = [ "rm dict/entry[. = 'registry-mirrors']", ]
|
||||
}
|
||||
|
||||
if $debug {
|
||||
$debug_changes = [
|
||||
'set dict/entry[. = "debug"] "debug"',
|
||||
"set dict/entry[. = \"debug\"]/const \"${debug}\"",]
|
||||
"set dict/entry[. = 'debug'] debug",
|
||||
"set dict/entry[. = 'debug']/const true", ]
|
||||
} else {
|
||||
$debug_changes = [ 'rm dict/entry[. = "debug"]', ]
|
||||
$debug_changes = [
|
||||
"set dict/entry[. = 'debug'] debug",
|
||||
"set dict/entry[. = 'debug']/const false", ]
|
||||
}
|
||||
|
||||
file { '/etc/docker/daemon.json':
|
||||
|
@ -86,8 +86,8 @@ describe 'tripleo::profile::base::docker' do
|
||||
it { is_expected.to contain_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') }
|
||||
it {
|
||||
is_expected.to contain_augeas('docker-daemon.json-mirror').with_changes(
|
||||
['set dict/entry[. = "registry-mirrors"] "registry-mirrors',
|
||||
"set dict/entry[. = \"registry-mirrors\"]/array/string \"http://foo/bar\""])
|
||||
["set dict/entry[. = 'registry-mirrors'] registry-mirrors",
|
||||
"set dict/entry[. = 'registry-mirrors']/array/string \"http://foo/bar\""])
|
||||
}
|
||||
end
|
||||
|
||||
@ -103,8 +103,8 @@ describe 'tripleo::profile::base::docker' do
|
||||
it { is_expected.to contain_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') }
|
||||
it {
|
||||
is_expected.to contain_augeas('docker-daemon.json-debug').with_changes(
|
||||
['set dict/entry[. = "debug"] "debug"',
|
||||
"set dict/entry[. = \"debug\"]/const \"true\""])
|
||||
["set dict/entry[. = 'debug'] debug",
|
||||
"set dict/entry[. = 'debug']/const true"])
|
||||
}
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user