Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以问题很简单。如果我的 lwrp 所做的更改是假的还是真的,我能得到答案吗?我知道它在 Chef Logs 中可见,但我的想法是稍后在配方代码中使用结果。
不,资源没有“输出”值。也就是说,您可以执行一些操作,例如存储一个值,node.run_state[:foo]该值是从所有收敛级别都可见的全局哈希。可变的全局值是陈词滥调是有原因的,但它们确实很难维护。
node.run_state[:foo]