From 7c5b2303169e443658cc4d8a5147f01dcbfe2e75 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 13 Apr 2024 14:15:56 +0900 Subject: [PATCH] Simplify redundant resource dependency We don't have to define both "require" and "subscribe" and just having subscribe is enough. Change-Id: I1a19c54ba2e53a5d5adc30fc025a08693e2cf566 --- manifests/init.pp | 3 +-- spec/classes/tempest_init_spec.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index ee151604..4e62de37 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -645,10 +645,9 @@ class tempest( command => "tempest init ${tempest_workspace}", path => ['/bin', '/usr/bin'], refreshonly => true, - require => Package['tempest'], + subscribe => Package['tempest'], } Package<| tag == 'tempest-package' |> -> Exec['tempest-workspace'] - Package['tempest'] ~> Exec['tempest-workspace'] Exec['tempest-workspace'] -> Tempest_config<||> $tempest_conf = "${tempest_workspace}/etc/tempest.conf" diff --git a/spec/classes/tempest_init_spec.rb b/spec/classes/tempest_init_spec.rb index edec7355..d28e97e4 100644 --- a/spec/classes/tempest_init_spec.rb +++ b/spec/classes/tempest_init_spec.rb @@ -432,7 +432,7 @@ describe 'tempest' do :command => 'tempest init /var/lib/tempest', :path => ['/bin', '/usr/bin'], :refreshonly => true, - :require => 'Package[tempest]' + :subscribe => 'Package[tempest]' ) end end