在.pp文件中:
replication => [
{
name => 'local',
url => xyz,
push => ['refs/heads', 'refs/tags'],
},
{
name => 'github',
url => abc,
push => ['refs/heads', 'refs/tags'],
},
]
如何定义模板来输出replication.config文件如下所示:
[remote "local"]
url = abc
push = refs/heads
push = refs/tags
[remote "github"]
url = abc
push = refs/heads
push = refs/tags
答案1
您可以基于模板创建定义的资源类型并使用puppetlabs-concat将基于相同模板的两个部分合并到您想要的 replication.config 中。