Puppet:禁用通知命令的echo

时间:2012-06-28 09:11:05

标签: puppet

我想在应用配置时打印一些消息和变量值。 我还想在视觉上分离不同配置块的输出。所以我用

notify {"\n\nINSTALL TOMCAT TO $target_folder":}

如傀儡tutorialsdocumentation中所述。

不幸的是,输出并没有真正为整个日志添加可读性:

notice: 

INSTALL TOMCAT TO /opt/example/uiserver
notice: /Stage[main]//Node[dev-xyz.example.com]/Tomcat[uiserver_tomcat]/Notify[

INSTALL TOMCAT TO /opt/example/uiserver]

INSTALL TOMCAT TO /opt/example/uiserver'

问题 - 木偶不仅仅打印信息,还输出恼人的回声/message: defined 'message' as '。有没有办法消除它?

使用withpath => false没有帮助。

Puppet 2.7.17。

2 个答案:

答案 0 :(得分:3)

将--logdest设置为syslog。 默认为console

--logdest:
  Where to send messages. Choose between syslog, the console, and a log
  file. Defaults to sending messages to the console.

答案 1 :(得分:1)

也许尝试使用notice()函数而不是http://www.puppetcookbook.com/posts/simple-debug-messages.html

的通知类型

使用notice()函数将mesagee写入puppetmaster的日志而不是客户端,但不会有回显的回声线。

相关问题