我有一个 Chef Recipe ,可以使用以下数据监控服务是否正在运行
service = "test"
if ::Win32::Service.exists?(service)
service "test" do
action [:enable, :start]
end
else
windows_package "test" do
source "\\10.10.10.10\test.exe"
installer_type :custom
options 'install ip=10.10.10.11'
end
end
我需要将此值添加到远程 mysql 表(mysql 服务器 IP 10.10.10.12),以便我可以创建用于报告的 html 或 php 页面。
请帮忙
最佳答案
您可以采用与手动相同的方式执行此操作,通常使用 Web 框架中内置的内容或运行 mysql
命令行工具的 execute
资源。
关于mysql - Chef Recipe 将值添加到 mysql 表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42598303/