【问题标题】:Augeas memcached edit via puppetAugeas memcached 通过 puppet 进行编辑
【发布时间】:2014-08-28 15:52:58
【问题描述】:

我正在尝试通过带有 puppet 的 Augeas 更改我的 memcached.conf 文件。我的清单文件中有这个:

  augeas { 'listen_on_IP':
    context => '/etc/memcached.conf',
    changes => ['set l 0.0.0.0'],
  }

但我没有看到任何变化。

我正在使用 Ubuntu 12.04(尽可能模仿 Heroku 的 Celadon Cedar 堆栈)并从 a stock memcached.conf 开始。

我做错了什么?

【问题讨论】:

  • puppet agent --test --debug 的输出是否包含任何提示?
  • 我会在我回到我的机器时尝试一下。

标签: heroku memcached puppet augeas


【解决方案1】:

您的context 错误。它应该如下所示:

augeas { 'listen_on_ip':
  context => '/files/etc/memcached.conf',
  changes => ['set l 0.0.0.0']
}

查看the augueas documentation 以获取有关augeas tree 的更多信息。 (例如/files/augeas 等)

希望这会有所帮助!

【讨论】:

  • 这对我不起作用。我开始怀疑我的 puppet 安装将 augeas 资源视为无操作。
  • @Erik 只是为了解决问题。你能提供augtool print /files/etc/memcached.conf/l的输出吗?如果您使用Puppet Enterprise,那么puppet 的augtool 将位于/opt/puppet/bin
  • which augtool 告诉我它没有安装。我通过这个 vagrant 脚本安装 puppet:github.com/hashicorp/puppet-bootstrap。我以为 augeas 是像 hiera 一样安装的。
  • 我不确定那个安装脚本。也许没有满足先决条件? https://docs.puppetlabs.com/guides/augeas.html#pre-requisitesdpkg --list|grep aug 的输出是什么?
  • 我很茫然。我刚刚启动了一个 ubuntu 节点,使用了该安装脚本,并且我的答案中的 augeas 资源对我有用。对不起。不知道是什么问题。
猜你喜欢
  • 2016-11-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-10
  • 2010-12-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多