gun*_*win 11 http puppet puppetmaster puppet-dashboard
有没有一种(简单的)方法让 puppet 使用 Internet 上可用的文件作为文件的 Source 属性?
例如:
file { "/home/text.txt":
source => [
"http://www.example.com/text.txt",
]
}
Run Code Online (Sandbox Code Playgroud)
我正在写一个更新的答案,以通知未来的读者现在 File 资源确实实现了 HTTP 源。
从文档:
来源
将复制到本地系统上的源文件。此属性与内容和目标互斥。允许的值为:
- puppet:URI,指向模块中的文件或 Puppet 文件服务器挂载点。
- 本地可用文件(包括 NFS 共享或 Windows 映射驱动器上的文件)的完全限定路径。
- 文件:URI,其行为与本地文件路径相同。
- http: URIs,指向普通 Web 服务器提供的文件
因此,您可以在编写时使用该构造:
file { "/home/text.txt":
source => "http://www.example.com/text.txt",
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4682 次 |
最近记录: |