Kir*_*ran 3 wsus environment-variables puppet puppetmaster centos7
我在 Centos 7.2 上使用 WSUS 模块和 Puppet Master。我的 Puppet 代理服务器运行的是 Windows Server 2012。
我想使用带有变量的清单。但是,当 Puppet Agent 服务器运行 puppet 代理时,它会显示“错误 400,语法错误”。我尝试重新编写清单和我能想到的每一个变化。我不断收到一些错误。
以下是清单的一个示例:
class excellent {
class { 'wsus_client':
$cool = 'Saturday'
server_url => 'http://acme.com',
auto_update_option => 'Scheduled'
scheduled_install_day => $cool,
scheduled_install_hour => 1,
}
}
Run Code Online (Sandbox Code Playgroud)
我试过在大括号 {} 中分配变量。我尝试使用 $LOAD_PATH、--custom-dir 和 FACTERLIB。但我无法弄清楚如何使用这三个中的任何一个。
我想在一个地方更改变量并在其父类的范围内使用它。我该怎么办?
你试过这种方法吗?
class excellent {
$cool = 'Saturday'
class { 'wsus_client':
server_url => 'http://acme.com',
auto_update_option => 'Scheduled'
scheduled_install_day => $cool,
scheduled_install_hour => 1,
}
}
Run Code Online (Sandbox Code Playgroud)
或者,这样
class excellent (
$cool = 'Saturday'
){
class { 'wsus_client':
server_url => 'http://acme.com',
auto_update_option => 'Scheduled'
scheduled_install_day => $cool,
scheduled_install_hour => 1,
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6288 次 |
| 最近记录: |