0
比方說,我有3個execute
資源「創建用戶」,「安裝客戶端」和「驗證客戶端」。廚師 - 多種資源的防止執行
如果滿足一個條件,我該如何防止執行所有這些資源?
喜歡的東西:
block 'Manage client' do
execute 'Create users' do
cwd scripts_path
command './installClient.sh -create_users'
end
execute 'Install client' do
cwd scripts_path
command '/installClient.sh -installClient'
end
execute 'Verify client' do
cwd scripts_path
command './installClient.sh -verifyClient'
end
not_if { ::File.exists?('/tmp/client_configured_success') }
end
是的,foodcritic會抱怨這一點。 FoodCritic是錯誤的。 – coderanger