来自 Puppet 脚本 运行 的回显消息
Echo messages from a script run by Puppet
我正在编写一个 bash 脚本,它将由 Exec 资源的人偶 运行(我知道。这并不理想)。我想知道是否可以在脚本中创建调试消息。通常在 Bash 中我使用回显,在清单中我使用通知。但是当脚本作为 Exec 资源在 Puppet 中执行时,echo 似乎不起作用。
在此处查看 logoutput
属性的文档:https://docs.puppet.com/puppet/latest/reference/types/exec.html#exec-attribute-logoutput
在 logoutput
设置为 true
的 Puppet 代理执行期间,您始终可以在脚本中看到 echo
的输出。
例如:
exec { '/bin/sh script.sh': logoutput => true }
我正在编写一个 bash 脚本,它将由 Exec 资源的人偶 运行(我知道。这并不理想)。我想知道是否可以在脚本中创建调试消息。通常在 Bash 中我使用回显,在清单中我使用通知。但是当脚本作为 Exec 资源在 Puppet 中执行时,echo 似乎不起作用。
在此处查看 logoutput
属性的文档:https://docs.puppet.com/puppet/latest/reference/types/exec.html#exec-attribute-logoutput
在 logoutput
设置为 true
的 Puppet 代理执行期间,您始终可以在脚本中看到 echo
的输出。
例如:
exec { '/bin/sh script.sh': logoutput => true }