我正在运行 Foreman 1.7 和 puppet 3.4.3。我使用以下命令配置了我的环境:http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#Smart-proxy-do-not-recognize-my-puppet-environment
当然,默认的“生产”环境会显示,但是单击“从 Puppet 导入”时,它只会显示绿色框“未检测到对环境的更改”。$confdir/environments/staging/manifests/site.pp 存在,但似乎不需要生产环境才能显示。
智能代理日志显示以下内容:
10.210.102.3 - - [16/Dec/2014 18:06:25] "GET /puppet/environments HTTP/1.1" 200 24 0.0240
10.210.102.3 - - [16/Dec/2014 18:06:25] "GET /puppet/environments/production/classes HTTP/1.1" 200 2 0.0879
10.210.102.3 - - [16/Dec/2014 18:06:25] "GET /puppet/environments/staging/classes HTTP/1.1" 200 2 0.0861
因此它能够找到暂存环境。
有任何想法吗?
puppet.conf
[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
autosign = $confdir/autosign.conf { mode = 664 }
show_diff = false
hiera_config = $confdir/hiera.yaml
[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
default_schedules = false
report = true
pluginsync = true
masterport = 8140
environment = production
certname = #####
server = #####
listen = false
splay = false
splaylimit = 1800
runinterval = 1800
noop = false
configtimeout = 120
usecacheonfailure = true
[master]
autosign = $confdir/autosign.conf { mode = 664 }
reports = foreman
external_nodes = /etc/puppet/node.rb
node_terminus = exec
ca = true
ssldir = /var/lib/puppet/ssl
certname = ####
strict_variables = false
[production]
modulepath = /etc/puppet/environments/production/modules:/etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules
config_version =
[staging]
modulepath = /etc/puppet/environments/staging/modules:/etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules
config_version =
manifest = $confdir/environments/staging/manifests/site.pp
fileserverconfig = /etc/puppet/fileserver.conf
templatedir=/etc/puppet/templates/
答案1
您可以通过 Foreman GUI 添加您的环境,然后运行导入。如果它不想删除新环境,一切都很好。