2
A
回答
2
如果您將DependsOn添加到任何您不想繼續的資源,那麼如果依賴關係鏈中的任何內容有錯誤,它將會中止。
參見Using DependsOn和this StackOverflow answer describing dependencies
對於實施例,在下面的結構中,如果組出現故障時,沒有任何其他資源將被創建,因爲UserExample取決於GroupExample,和UserExample2取決於UserExample。
Configuration DependsOnExample {
Node Test-PC1 {
Group GroupExample {
Ensure = "Present"
GroupName = "TestGroup"
}
User UserExample {
Ensure = "Present"
UserName = "TestUser"
FullName = "TestUser"
DependsOn = "[Group]GroupExample"
}
User UserExample2 {
Ensure = "Present"
UserName = "TestUser2"
FullName = "TestUser2"
DependsOn = "[User]UserExample"
}
}
}
目前沒有一種方法可以在沒有顯式依賴的情況下獲得相同的行爲。
如果你想從產品團隊要求的功能,我建議您提交的問題在PowerShell User Voice
特拉維斯
相關問題
- 1. Ruby on rails rake db:reseed abort
- 2. Abort SMS Intent on Android KitKat
- 3. SIGBART on UIApplicationMain error
- 4. C#On Error resume
- 5. mod_rewrite on 403 error
- 6. On Error Goto in Python
- 7. ruby on rails rspec error
- 8. Application.OnTime on Error Resume Next
- 9. setOnClickListener FloatingActionButton on Fragment Error
- 10. linphone on windows building error
- 11. SoapUI error on request - NoClassDefFoundError
- 12. On Error not in vba
- 13. Ruby on Rails | AirBrake Error
- 14. Redmine pg error on heroku
- 15. vbscrip error set on OpenTextFile()
- 16. RewriteEngine on casuses error 500
- 17. SKPhysicsbody error on collision swift
- 18. Javascript Error,Escaping Problem,Grid not working,Error on Firebug
- 19. On Error Goto引發錯誤
- 20. xts.coercible error while apply.daily on xts
- 21. function rowCount()on non-object error
- 22. VBA - Excel - On Error goto userform
- 23. Apache Derby Lexical Error on#-sign?
- 24. mochajs的「Stop on Error」選項
- 25. Ruby on rails flash notice error
- 26. CIL執行On Error Resume Next
- 27. Flash Error#1009 on mouse click
- 28. vba'Compiler error expected:='on saveAs operation
- 29. Ruby on Rails best_in_place gem throwing error
- 30. 如何使用On Error GoTo?
這是如此冗長而脆... – Jeff
我編輯的鏈接的帖子提交用戶語音項目以向我們的產品團隊建議更好的行爲,但在這個時候,我相信這是最好的答案。 – TravisEz13
好的,謝謝。那真不幸。 DSC在概念上確實是一個好主意。不幸的是,它似乎非常脆弱,讓它起作用是一件令人頭疼的事情。現在使用廚師引擎似乎是一個更穩定的解決方案 – Jeff