diff --git a/manifests/profile/base/docker.pp b/manifests/profile/base/docker.pp index 71e872db7..c60b7894f 100644 --- a/manifests/profile/base/docker.pp +++ b/manifests/profile/base/docker.pp @@ -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': diff --git a/spec/classes/tripleo_profile_base_docker_spec.rb b/spec/classes/tripleo_profile_base_docker_spec.rb index 3bdf36ae5..b2047126b 100644 --- a/spec/classes/tripleo_profile_base_docker_spec.rb +++ b/spec/classes/tripleo_profile_base_docker_spec.rb @@ -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