Puppet apply vs Puppet Agent -t

puppet apply vs puppet agent -t

我是 Puppet 的新手,在学习 Puppet 课程时,我发现有人使用 'puppet agent -t' 命令配置代理节点,而在另一门课程中,讲师使用 'puppet apply' 命令。

这两个命令有什么区别?

这些是:

  • puppet apply - 在本地机器上应用或 "executes" Puppet 代码。
  • puppet agent -t 有时也写成 puppet agent --test - 调用 Puppet Agent 从 Puppet Master 检索目录(编译的 Puppet 代码),然后立即在本地应用它。

请注意,-t 命名错误,它可能最初是为 "testing" 而设计的,但实际上它根本不是 "test" 模式,但会进行更改到您的机器。

另请参阅 puppet agent --noop 了解真正的 "test"(干燥-运行)模式。