3

我在kick模式(puppetrun)中使用 Puppet:

客户的 puppet.conf:

[main]
    modulepath = /etc/puppet/modules:/usr/share/puppet/modules
    logdir = /var/log/puppet
    rundir = /var/run/puppet

    # The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl
    server = puppetmaster.example.com
    listen = true

    # only kick, no polling
    client = false
    certname = client.example.com
    pluginsync = true

[agent]
    # The default value is '$confdir/classes.txt'.
    classfile = $vardir/classes.txt
    ignorecache = true
    report = true
    environment = dev
    client = false

    # The default value is '/localconfig'.
    localconfig = $vardir/localconfig

* puppet kick --host *效果很好,但另外每 30 (runinterval) 分钟,puppet 客户端执行一次由自身触发的部署(轮询)。

我以为client=false会停止轮询,但似乎没有。

有人知道解决这个问题的方法吗?

来自慕尼黑的感谢,安迪

4

2 回答 2

2

client = false根据 http://docs.puppetlabs.com/references/stable/configuration.html , puppet.conf 中的指令似乎不存在(尽管页面顶部指定它应该可用)。

但是,--no-client您可以在启动代理时指定选项(检查puppet help agent):

--no-client:
  Do not create a config client. This will cause the daemon to run
  without ever checking for its configuration automatically, and only
  makes sense when puppet agent is being run with listen = true in puppet.conf
  or was started with the `--listen` option.

添加这些的最佳位置是/etc/sysconfig/puppet基于 RPM 的 GNU/Linux 发行版和/etc/default/puppet基于 deb 的发行版。对于其他人,您必须检查启动脚本。

于 2012-08-01T17:02:31.570 回答
0

看起来您想要在 [main] 部分中使用 'onetime=true'。好像没有客户端设置。请参阅http://docs.puppetlabs.com/references/stable/configuration.html#onetime

于 2012-08-01T12:26:51.877 回答