diff --git a/manifests/run.pp b/manifests/run.pp index 74ddbae17..a686e5651 100755 --- a/manifests/run.pp +++ b/manifests/run.pp @@ -320,6 +320,10 @@ timeout => 0 } + file { $initscript: + ensure => absent, + } + } else { file { $initscript: diff --git a/spec/defines/run_spec.rb b/spec/defines/run_spec.rb index d6c53c5f5..4dce1eb34 100755 --- a/spec/defines/run_spec.rb +++ b/spec/defines/run_spec.rb @@ -90,7 +90,7 @@ else it { should contain_file(initscript).with_content(/Required-Start:.*\s+docker-foo/) } it { should contain_file(initscript).with_content(/Required-Start:.*\s+docker-bar/) } - it { should contain_file(initscript).with_content(/Required-Start:.*\s+docker-foo_bar-baz/) } + it { should contain_file(initscript).with_content(/Required-Start:.*\s+docker-foo_bar-baz/) } end end end @@ -706,6 +706,7 @@ it { should compile.with_all_deps } it { should contain_service('docker-sample').with_ensure(false) } it { should contain_exec("remove container docker-sample").with_command('docker rm -v sample') } + it { should contain_file(initscript).with_ensure('absent') } end end