diff --git a/manifests/plugin/discovery.pp b/manifests/plugin/discovery.pp index b27826fa..e395c598 100644 --- a/manifests/plugin/discovery.pp +++ b/manifests/plugin/discovery.pp @@ -42,10 +42,10 @@ remote_location => "${source_url}${image_name}", mode => '0644', } ~> exec { "untar ${image_name}": - command => "tar xf ${image_name}", - path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - cwd => "${tftp_root_clean}/boot", - creates => "${tftp_root_clean}/boot/fdi-image/initrd0.img", + command => "tar xf ${image_name}", + path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + cwd => "${tftp_root_clean}/boot", + refreshonly => true, } } } diff --git a/spec/classes/foreman_proxy__plugin__discovery_spec.rb b/spec/classes/foreman_proxy__plugin__discovery_spec.rb index 9455ebfd..7b4beff3 100644 --- a/spec/classes/foreman_proxy__plugin__discovery_spec.rb +++ b/spec/classes/foreman_proxy__plugin__discovery_spec.rb @@ -71,7 +71,7 @@ 'command' => 'tar xf fdi-image-latest.tar', 'path' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'cwd' => "#{tftproot}/boot", - 'creates' => "#{tftproot}/boot/fdi-image/initrd0.img", + 'refreshonly' => true, }) end end