资源属性和 'require'

Resource attributes and 'require'

根据文档,'require' 属性似乎不存在于 'exec'、'package'、'file' 等资源类型中。

我在 Whosebug 上看过几篇帖子,其中人们展示了使用 'require' 作为属性来执行某种资源排序和依赖关系的示例。 Require 似乎只是一个 class 函数。

这个有变化吗?还是社区误导了 'require' 作为资源属性的用法?

Has there been changes to this?

没有

Or is the community misled about the usage of 'require' as a resource attribute?

没有

require 是 Puppet 的 metaparameters. These can be used with every resource type, including custom types and defined types. This has been the case since before the earliest Puppet I have experience with, v0.24.8. Since they apply to every single resource type, and have exactly the same meaning for each, they are documented in their own section (linked above). The language reference also discusses them and their universal nature.

之一