我想要这样的东西:
$ssl_domains = ['dev.mydomain.com']
['admin', 'api', 'web'].each |$site| {
['tom', 'jeff', 'harry'].each |$developer| {
$ssl_domains << "$site.$developer.dev.mydomain.com"
}
}
letsencrypt::certonly { 'dev-cert':
domains => $ssl_domains,
plugin => 'apache',
manage_cron => true,
}
Run Code Online (Sandbox Code Playgroud)
现在因为Puppet的变量范围而不可能.如何通过嵌套循环收集数组中的某些变量?