Puppet 错误 - 必须将 puppet_server 传递给 Class

Puppet 错误 - 必须将 puppet_server 传递给 Class

puppet我在使用Puppet master 上的模块来管理 master(Apache / Passenger)和 agent 时收到以下错误

[ashinn@puppet1 ~]$ sudo puppet agent --test
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/os_maj_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Must pass puppet_server to Class[Puppet::Agent] at /etc/puppet/environments/production/modules/puppet/manifests/init.pp:181 on node puppet1.mydomain.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

节点定义puppet1.mydomain.com非常简单:

node 'puppet1.mydomain.com' {
  include motd
  include ntp

  class { 'puppet' :
    puppet_server    => 'puppet.mydomain.com',
    version          => 'latest',
    master           => true,
    agent            => true,
    autosign         => '$confdir/autosign.conf',
    manifest         => '$confdir/environments/$environment/manifests/site.pp',
    modulepath       => '$confdir/environments/$environment/modules',
    puppet_passenger => true,
  }
}

具体模块和init.pp位于https://github.com/olindata/puppetlabs-puppet/blob/master/manifests/init.pp}. 第 181 行包含'class { puppet::master:` 语句的结束。

我可以看到确实init.pp传递puppet_server给了puppet::agent班级:

  if $agent {
    class {'puppet::agent':
      version                   => $version,
      puppet_defaults           => $puppet_defaults,
      puppet_agent_service      => $puppet_agent_service,
      puppet_server             => $puppet_server,
      environment               => $environment,
      puppet_conf               => $puppet_conf,
      puppet_agent_name         => $puppet_agent_name,
      package_provider          => $package_provider,
      reporting                 => $reporting,
      user_id                   => $user_id,
      group_id                  => $group_id,  
    }
  }

哪里出了问题?我是不是忽略了某些显而易见的东西?

相关内容