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 {
|
if $registry_mirror {
|
||||||
$mirror_changes = [
|
$mirror_changes = [
|
||||||
'set dict/entry[. = "registry-mirrors"] "registry-mirrors',
|
"set dict/entry[. = 'registry-mirrors'] registry-mirrors",
|
||||||
"set dict/entry[. = \"registry-mirrors\"]/array/string \"${registry_mirror}\""
|
"set dict/entry[. = 'registry-mirrors']/array/string \"${registry_mirror}\""
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
$mirror_changes = [ 'rm dict/entry[. = "registry-mirrors"]', ]
|
$mirror_changes = [ "rm dict/entry[. = 'registry-mirrors']", ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if $debug {
|
if $debug {
|
||||||
$debug_changes = [
|
$debug_changes = [
|
||||||
'set dict/entry[. = "debug"] "debug"',
|
"set dict/entry[. = 'debug'] debug",
|
||||||
"set dict/entry[. = \"debug\"]/const \"${debug}\"",]
|
"set dict/entry[. = 'debug']/const true", ]
|
||||||
} else {
|
} 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':
|
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_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') }
|
||||||
it {
|
it {
|
||||||
is_expected.to contain_augeas('docker-daemon.json-mirror').with_changes(
|
is_expected.to contain_augeas('docker-daemon.json-mirror').with_changes(
|
||||||
['set dict/entry[. = "registry-mirrors"] "registry-mirrors',
|
["set dict/entry[. = 'registry-mirrors'] registry-mirrors",
|
||||||
"set dict/entry[. = \"registry-mirrors\"]/array/string \"http://foo/bar\""])
|
"set dict/entry[. = 'registry-mirrors']/array/string \"http://foo/bar\""])
|
||||||
}
|
}
|
||||||
end
|
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_file('/etc/systemd/system/docker.service.d/99-unset-mountflags.conf') }
|
||||||
it {
|
it {
|
||||||
is_expected.to contain_augeas('docker-daemon.json-debug').with_changes(
|
is_expected.to contain_augeas('docker-daemon.json-debug').with_changes(
|
||||||
['set dict/entry[. = "debug"] "debug"',
|
["set dict/entry[. = 'debug'] debug",
|
||||||
"set dict/entry[. = \"debug\"]/const \"true\""])
|
"set dict/entry[. = 'debug']/const true"])
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user