【问题标题】:Cannot get puppet agent to work无法让傀儡代理工作
【发布时间】:2013-07-06 10:08:20
【问题描述】:

我正在尝试在代理机器上设置 puppet。在代理机器上,我能够运行命令,当我检查 master 时,我签署了它的证书。现在在代理机器上我运行以下命令

sudo puppet agent --test --onetime --verbose

我得到以下输出

Info: Retrieving plugin
Info: Caching catalog for vpuppetslave.jrock20041.dyndns.org
Info: Applying configuration version '1373014974'

在代理机器上,这里是 puppet.conf 文件

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
server = mediacenter.jrock20041.dyndns.org

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

[agent]
server = mediacenter.jrock20041.dyndns.org

在主机上,这是我的 site.pp 文件

import 'nodes.pp'

在master机器上,这里是我的nodes.pp文件

node 'mediacenter' {
    #include nginx
    #include openssh-server
    #include ssh

    file { '/tmp/hello':
            content => "Hello, World!\n",
    }

    user { 'jcostanzo':
            ensure     => present,
            comment    => 'John Costanzo',
            home       => '/home/jcostanzo',
            managehome => true,
    }
}

node 'vpuppetslave' {
    #include nginx
    #include openssh-server
    #include ssh

    file { '/tmp/hello':
            content => "Hello, World!\n",
    }

    user { 'jcostanzo':
            ensure     => present,
            comment    => 'John Costanzo',
            home       => '/home/jcostanzo',
            managehome => true,
    }
}

不知道我做错了什么。感谢您的帮助

【问题讨论】:

    标签: puppet


    【解决方案1】:

    好吧,我终于知道我哪里出错了。主服务器和代理服务器都有问题。

    大师

    我的清单文件在我的用户主目录中,而不是在 /etc/puppet 目录中。一旦我把它修好,那就没问题了

    代理

    我将配置放在 /etc/puppet 中而不是 ~/.puppet/ 目录中。

    一旦我解决了这两个问题,我就没事了,现在我正在工作。

    【讨论】:

      猜你喜欢
      • 2014-06-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多