1

由于modulepath现在在隐式范围 (IE main) 中已弃用这一事实,我如何才能为我的每个环境保留模块路径?我想将我的模块保留在全局范围内,而不必指定环境。

[main]
    certname = {somecert}
    dns_alt_names = puppet,{otherorgs}
    vardir = /var/opt/lib/pe-puppet
    logdir = /var/log/pe-puppet
    rundir = /var/run/pe-puppet
    modulepath = $confdir/environments/$environment/modules:/opt/puppet/share/puppet/modules
    manifest = /etc/puppetlabs/puppet/environments/$environment/manifests/site.pp
    server = {puppetserver}
    user  = pe-puppet
    group = pe-puppet
    archive_files = true
    archive_file_server = {puppetserver}

[master]
    certname = {puppetserver}
    ca_name = 'Puppet CA generated on {puppetserver} at 2013-11-07 13:15:40 -0800'
    reports = puppetdb,cimlog,console
    node_terminus = console
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header = SSL_CLIENT_VERIFY
    storeconfigs_backend = puppetdb
    storeconfigs = true
    manifest=$confdir/environments/$environment/manifests/site.pp

[agent]
    report = true
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig
    graph = true
    pluginsync = true
    environment = production
    http_compression = true
    splaylimit=1800
    configtimeout=480
    splay=true
4

1 回答 1

1

你在这里问什么并不完全清楚,但我假设你关心保留保持一组全局模块的能力,/opt/puppet/share/puppet/modules这与各自的环境无关。

Puppet 通过basemodulepath选项允许这样做。

[main]
environmentpath=$confdir/environments
basemodulepath=/opt/puppet/share/puppet/modules
于 2014-12-16T10:46:05.240 回答