diff --git a/manifests/init.pp b/manifests/init.pp index a9fa86a..77f9d5f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -223,10 +223,12 @@ define concat( default => '/bin:/usr/bin', } + # Need to have an unless here for idempotency. exec { "concat_${name}": alias => "concat_${fragdir}", command => $absent_exec_command, - path => $absent_exec_path + unless => $absent_exec_command, + path => $absent_exec_path, } } } diff --git a/spec/unit/defines/concat_spec.rb b/spec/unit/defines/concat_spec.rb index 5dfdfd2..e7be4d5 100644 --- a/spec/unit/defines/concat_spec.rb +++ b/spec/unit/defines/concat_spec.rb @@ -144,6 +144,7 @@ describe 'concat', :type => :define do should contain_exec("concat_#{title}").with({ :alias => "concat_#{fragdir}", :command => 'true', + :unless => 'true', :path => '/bin:/usr/bin', }) end